类 KubernetesSecretsProviderConfigurator

  • 所有已实现的接口:
    SecretsProviderConfigurator

    public class KubernetesSecretsProviderConfigurator
    extends java.lang.Object
    implements SecretsProviderConfigurator
    This file defines the SecretsProviderConfigurator that will be used by default for running in Kubernetes. As such this implementation is strictly when workers are configured to use kubernetes runtime. We use kubernetes in built secrets and bind them as environment variables within the function container to ensure that the secrets are available to the function at runtime. Then we plug in the EnvironmentBasedSecretsConfig as the secrets provider who knows how to read these environment variables.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void configureKubernetesRuntimeSecretsProvider​(io.kubernetes.client.openapi.models.V1PodSpec podSpec, java.lang.String functionsContainerName, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Attaches any secrets specific stuff to the k8 container for kubernetes runtime.
      void configureProcessRuntimeSecretsProvider​(java.lang.ProcessBuilder processBuilder, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Attaches any secrets specific stuff to the ProcessBuilder for process runtime.
      void doAdmissionChecks​(io.kubernetes.client.openapi.apis.AppsV1Api appsV1Api, io.kubernetes.client.openapi.apis.CoreV1Api coreV1Api, java.lang.String jobNamespace, java.lang.String jobName, org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Do config checks to see whether the secrets provided are conforming.
      java.lang.reflect.Type getSecretObjectType()
      What is the type of the object that should be in the user secret config.
      java.lang.String getSecretsProviderClassName​(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Return the Secrets Provider Classname.
      java.util.Map<java.lang.String,​java.lang.String> getSecretsProviderConfig​(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
      Return the secrets provider config.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • KubernetesSecretsProviderConfigurator

        public KubernetesSecretsProviderConfigurator()
    • 方法详细资料

      • getSecretsProviderClassName

        public java.lang.String getSecretsProviderClassName​(org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
        从接口复制的说明: SecretsProviderConfigurator
        Return the Secrets Provider Classname. This will be passed to the cmdline of the instance and should contain the logic of connecting with the secrets provider and obtaining secrets.
        指定者:
        getSecretsProviderClassName 在接口中 SecretsProviderConfigurator
      • configureKubernetesRuntimeSecretsProvider

        public void configureKubernetesRuntimeSecretsProvider​(io.kubernetes.client.openapi.models.V1PodSpec podSpec,
                                                              java.lang.String functionsContainerName,
                                                              org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
        从接口复制的说明: SecretsProviderConfigurator
        Attaches any secrets specific stuff to the k8 container for kubernetes runtime.
        指定者:
        configureKubernetesRuntimeSecretsProvider 在接口中 SecretsProviderConfigurator
      • doAdmissionChecks

        public void doAdmissionChecks​(io.kubernetes.client.openapi.apis.AppsV1Api appsV1Api,
                                      io.kubernetes.client.openapi.apis.CoreV1Api coreV1Api,
                                      java.lang.String jobNamespace,
                                      java.lang.String jobName,
                                      org.apache.pulsar.functions.proto.Function.FunctionDetails functionDetails)
        从接口复制的说明: SecretsProviderConfigurator
        Do config checks to see whether the secrets provided are conforming.
        指定者:
        doAdmissionChecks 在接口中 SecretsProviderConfigurator