Openshift Pods Driver
Selecting the openshift pods driver adds the following options to the providers section of the configuration.
-
providers.[openshiftpods]
Type: list The Openshift Pods driver is similar to the Openshift driver, but it only supports pod label. This enables using an unprivileged service account that doesn’t require the self-provisioner role.
Example:
providers: - name: cluster driver: openshiftpods context: unprivileged-context-name pools: - name: main labels: - name: openshift-pod image: docker.io/fedora:28
-
providers.[openshiftpods].context (required)
Name of the context configured in
kube/config
.Before using the driver, Nodepool services need a
kube/config
file manually installed. Make sure the context is present inoc config get-contexts
command output.
-
providers.[openshiftpods].launch-retries
Default:3
The number of times to retry launching a pod before considering the job failed.
-
providers.[openshiftpods].max-pods
Default:infinite
Type: int Maximum number of pods that can be used.
-
providers.[openshiftpods].pools
Type: list A pool defines a group of resources from an Openshift provider.
-
providers.[openshiftpods].pools.name (required)
The project’s (namespace) name that will be used to create the pods.
-
providers.[openshiftpods].pools.priority
Default:100
Type: int The priority of this provider pool (a lesser number is a higher priority). Nodepool launchers will yield requests to other provider pools with a higher priority as long as they are not paused. This means that in general, higher priority pools will reach quota first before lower priority pools begin to be used.
This setting may be specified at the provider level in order to apply to all pools within that provider, or it can be overridden here for a specific pool.
-
providers.[openshiftpods].pools.node-attributes
Type: dict A dictionary of key-value pairs that will be stored with the node data in ZooKeeper. The keys and values can be any arbitrary string.
-
providers.[openshiftpods].pools.default-label-cpu
Type: int Specifies specifies a default value for providers.[openshiftpods].pools.labels.cpu for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.default-label-memory
Type: int Specifies a default value in MiB for providers.[openshiftpods].pools.labels.memory for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.default-label-storage
Type: int Specifies a default value in MB for providers.[openshiftpods].pools.labels.storage for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.default-label-cpu-limit
Type: int Specifies specifies a default value for providers.[openshiftpods].pools.labels.cpu-limit for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.default-label-memory-limit
Type: int Specifies a default value in MiB for providers.[openshiftpods].pools.labels.memory-limit for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.default-label-storage-limit
Type: int Specifies a default value in MB for providers.[openshiftpods].pools.labels.storage-limit for all labels of this pool that do not set their own value.
-
providers.[openshiftpods].pools.labels
Type: list Each entry in a pool`s labels section indicates that the corresponding label is available for use in this pool.
Each entry is a dictionary with the following keys
-
providers.[openshiftpods].pools.labels.name (required)
Identifier for this label; references an entry in the labels section.
-
providers.[openshiftpods].pools.labels.image
The image name.
-
providers.[openshiftpods].pools.labels.image-pull
Default:IfNotPresent
Type: str The ImagePullPolicy, can be IfNotPresent, Always or Never.
-
providers.[openshiftpods].pools.labels.image-pull-secrets
Default:[]
Type: list The imagePullSecrets needed to pull container images from a private registry.
Example:
labels: - name: openshift-pod type: pod image: docker.io/fedora:28 image-pull-secrets: - name: registry-secret
-
providers.[openshiftpods].pools.labels.labels
Type: dict A dictionary of additional values to be added to the namespace or pod metadata. The value of this field is added to the metadata.labels field in OpenShift. Note that this field contains arbitrary key/value pairs and is unrelated to the concept of labels in Nodepool.
-
providers.[openshiftpods].pools.labels.cpu
Type: int Specifies the number of cpu to request for the pod. If no limit is specified, this will also be used as the limit.
-
providers.[openshiftpods].pools.labels.memory
Type: int Specifies the amount of memory in MiB to request for the pod. If no limit is specified, this will also be used as the limit.
-
providers.[openshiftpods].pools.labels.storage
Type: int Specifies the amount of ephemeral-storage in MB to request for the pod. If no limit is specified, this will also be used as the limit.
-
providers.[openshiftpods].pools.labels.cpu-limit
Type: int Specifies the cpu limit for the pod.
-
providers.[openshiftpods].pools.labels.memory-limit
Type: int Specifies the memory limit in MiB for the pod.
-
providers.[openshiftpods].pools.labels.storage-limit
Type: int Specifies the ephemeral-storage limit in MB for the pod.
-
providers.[openshiftpods].pools.labels.python-path
-
providers.[openshiftpods].pools.labels.:type: str
-
providers.[openshiftpods].pools.labels.:default: auto
The path of the default python interpreter. Used by Zuul to set
ansible_python_interpreter
. The special valueauto
will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to/usr/bin/python2
for earlier versions.
-
providers.[openshiftpods].pools.labels.shell-type
Default:sh
Type: str The shell type of the node’s default shell executable. Used by Zuul to set
ansible_shell_type
. This setting should only be usedFor a windows pod with the experimental connection-type
ssh
, in which casecmd
orpowershell
should be set and reflect the node’sDefaultShell
configuration.If the default shell is not Bourne compatible (sh), but instead e.g.
csh
orfish
, and the user is aware that there is a long-standing issue withansible_shell_type
in combination withbecome
-
providers.[openshiftpods].pools.labels.env
Default:[]
Type: list A list of environment variables to pass to the Pod.
-
providers.[openshiftpods].pools.labels.env.name (required)
Type: str The name of the environment variable passed to the Pod.
-
providers.[openshiftpods].pools.labels.env.value (required)
Type: str The value of the environment variable passed to the Pod.
-
providers.[openshiftpods].pools.labels.env.name (required)
-
providers.[openshiftpods].pools.labels.node-selector
Type: dict A map of key-value pairs to ensure the OpenShift scheduler places the Pod on a node with specific node labels.
-
providers.[openshiftpods].pools.labels.scheduler-name
Type: str Sets the schedulerName field on the container. Normally left unset for the OpenShift default.
-
providers.[openshiftpods].pools.labels.privileged
Type: bool Sets the securityContext.privileged flag on the container. Normally left unset for the OpenShift default.
-
providers.[openshiftpods].pools.labels.volumes
Type: list Sets the volumes field on the pod. If supplied, this should be a list of OpenShift Pod Volume definitions.
-
providers.[openshiftpods].pools.labels.volume-mounts
Type: list Sets the volumeMounts flag on the container. If supplied, this should be a list of OpenShift Container VolumeMount definitions.
-
providers.[openshiftpods].pools.labels.name (required)
-
providers.[openshiftpods].pools.name (required)
-
providers.[openshiftpods].context (required)