类 KubernetesServiceAccountTokenAuthProvider

java.lang.Object
org.apache.pulsar.functions.auth.KubernetesServiceAccountTokenAuthProvider
所有已实现的接口:
FunctionAuthProvider, KubernetesFunctionAuthProvider

public class KubernetesServiceAccountTokenAuthProvider extends Object implements KubernetesFunctionAuthProvider
Kubernetes Function Authentication Provider that adds Service Account Token Projection to a function pod's container definition. This token can be used to authenticate the function instance with the broker and the function worker via OpenId Connect when each server is configured to trust the kubernetes issuer. See docs for additional details. Relevant settings:

brokerClientTrustCertsSecretName: The Kubernetes secret containing the broker's trust certs. If it is not set, the function will not use a custom trust store. The secret must already exist in each function's target namespace. The secret must contain a key named `ca.crt` with the trust certs. Only the ca.crt will be mounted.

serviceAccountTokenExpirationSeconds: The expiration for the token created by the KubernetesServiceAccountTokenAuthProvider. The default value is 3600 seconds.

serviceAccountTokenAudience: The audience for the token created by the KubernetesServiceAccountTokenAuthProvider.

Note: the pod inherits the namespace's default service account.