Class BasicKubernetesManifestCustomizer
- java.lang.Object
-
- org.apache.pulsar.functions.runtime.kubernetes.BasicKubernetesManifestCustomizer
-
- All Implemented Interfaces:
KubernetesManifestCustomizer,RuntimeCustomizer
public class BasicKubernetesManifestCustomizer extends java.lang.Object implements KubernetesManifestCustomizer
An implementation of theKubernetesManifestCustomizerthat allows for some basic customization of namespace, labels, annotations, node selectors, and tolerations. With the right RBAC permissions for the functions worker, these should be safe to modify (for example, a service account must have permissions in the specified jobNamespace)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasicKubernetesManifestCustomizer.RuntimeOpts
-
Constructor Summary
Constructors Constructor Description BasicKubernetesManifestCustomizer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcustomizeName(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, java.lang.String currentName)java.lang.StringcustomizeNamespace(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, java.lang.String currentNamespace)io.kubernetes.client.openapi.models.V1ServicecustomizeService(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, io.kubernetes.client.openapi.models.V1Service service)io.kubernetes.client.openapi.models.V1StatefulSetcustomizeStatefulSet(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, io.kubernetes.client.openapi.models.V1StatefulSet statefulSet)voidinitialize(java.util.Map<java.lang.String,java.lang.Object> config)static BasicKubernetesManifestCustomizer.RuntimeOptsmergeRuntimeOpts(BasicKubernetesManifestCustomizer.RuntimeOpts oriOpts, BasicKubernetesManifestCustomizer.RuntimeOpts newOpts)
-
-
-
Method Detail
-
initialize
public void initialize(java.util.Map<java.lang.String,java.lang.Object> config)
- Specified by:
initializein interfaceRuntimeCustomizer
-
customizeNamespace
public java.lang.String customizeNamespace(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, java.lang.String currentNamespace)- Specified by:
customizeNamespacein interfaceKubernetesManifestCustomizer
-
customizeName
public java.lang.String customizeName(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, java.lang.String currentName)- Specified by:
customizeNamein interfaceKubernetesManifestCustomizer
-
customizeService
public io.kubernetes.client.openapi.models.V1Service customizeService(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, io.kubernetes.client.openapi.models.V1Service service)- Specified by:
customizeServicein interfaceKubernetesManifestCustomizer
-
customizeStatefulSet
public io.kubernetes.client.openapi.models.V1StatefulSet customizeStatefulSet(org.apache.pulsar.functions.proto.Function.FunctionDetails funcDetails, io.kubernetes.client.openapi.models.V1StatefulSet statefulSet)- Specified by:
customizeStatefulSetin interfaceKubernetesManifestCustomizer
-
mergeRuntimeOpts
public static BasicKubernetesManifestCustomizer.RuntimeOpts mergeRuntimeOpts(BasicKubernetesManifestCustomizer.RuntimeOpts oriOpts, BasicKubernetesManifestCustomizer.RuntimeOpts newOpts)
-
-