Interface KubernetesWorkerKind
- All Known Implementing Classes:
DndWorkerKind,EnterpriseWorkerKind
public interface KubernetesWorkerKind
WorkerKind for Kubernetes processes that controls how the KubernetesWorkerImpl will configure its Pods.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetClasspathPrefix(Worker worker) Get the default pod template filename for the worker kind.intGet the default worker start timeout for the worker kind, in seconds.getEnvironmentVariables(Worker worker) Provides a map of environment variable names and values to be added to the k8s container.getJvmArgs(Worker worker) Provides a list of JVM args to be added to the java command line.The name of the environment variable that has the jvm args used by the worker process.getQueryWorkerArg(Worker worker) Get a command string that will be used to start the worker.booleanIf true, the query worker args are to be set as the container command.
-
Field Details
-
ENV_KEY_PROC_NAME
- See Also:
-
ENV_KEY_ARTIFACT_USER
- See Also:
-
ENV_KEY_AUTHENTICATED_USER
- See Also:
-
ENV_KEY_ARTIFACT_DEST
- See Also:
-
ENV_KEY_EXTRA_JVM_OPTIONS
- See Also:
-
ENV_KEY_JAVA_OPTS
- See Also:
-
ENV_KEY_ARGS
- See Also:
-
ENV_KEY_CLASSPATH_PREFIX
- See Also:
-
ENV_KEY_KUBERNETES_NAMESPACE
- See Also:
-
ENV_KEY_KUBERNETES_SERVICE_HOST
- See Also:
-
-
Method Details
-
getDefaultPodTemplateFile
String getDefaultPodTemplateFile()Get the default pod template filename for the worker kind.- Returns:
- filename containing the pod template yaml
-
getDefaultWorkerStartTimeoutSecs
int getDefaultWorkerStartTimeoutSecs()Get the default worker start timeout for the worker kind, in seconds.- Returns:
- start timeout value to be configured on the worker pod.
-
getQueryWorkerArg
Get a command string that will be used to start the worker.- Parameters:
worker- A worker object that will run as a k8s pod.- Returns:
- Worker start command
-
useQueryWorkerArgAsContainerCommand
boolean useQueryWorkerArgAsContainerCommand()If true, the query worker args are to be set as the container command. If false, the query worker args may be set as an environment variable, and a start script configured in the pod template yaml will use that.- Returns:
- True if getQueryWorkerArg(Worker w) should be set as the worker container's command array.
-
getClasspathPrefix
-
getJvmArgs
Provides a list of JVM args to be added to the java command line.- Parameters:
worker- A worker object that will run as a k8s pod.- Returns:
- JVM arg list, e.g. ["-Dkey1=val1", "-Dkey2=val2", "-Xmx4096m"]
-
getJvmArgsEnvVarName
String getJvmArgsEnvVarName()The name of the environment variable that has the jvm args used by the worker process. -
getEnvironmentVariables
Provides a map of environment variable names and values to be added to the k8s container.- Parameters:
worker- A worker object that will run as a k8s pod.- Returns:
- A map of environment variable names and values
-