Openshift Driver
Selecting the openshift driver adds the following options to the providers section of the configuration.
-
providers.[openshift]
Type: list An Openshift provider’s resources are partitioned into groups called pool (see providers.[openshift].pools for details), and within a pool, the node types which are to be made available are listed (see providers.[openshift].pools.labels for details).
Note
For documentation purposes the option names are prefixed
providers.[openshift]
to disambiguate from other drivers, but[openshift]
is not required in the configuration (e.g. belowproviders.[openshift].pools
refers to thepools
key in theproviders
section when theopenshift
driver is selected).Example:
providers: - name: cluster driver: openshift context: context-name pools: - name: main labels: - name: openshift-project type: project - name: openshift-pod type: pod image: docker.io/fedora:28
-
providers.[openshift].context (required)
Name of the context configured in
kube/config
.Before using the driver, Nodepool services need a
kube/config
file manually installed with self-provisioner (the service account needs to be able to create projects) context. Make sure the context is present inoc config get-contexts
command output.
-
providers.[openshift].launch-retries
Default:3
The number of times to retry launching a node before considering the job failed.
-
providers.[openshift].max-projects
Default:infinite
Type: int Maximum number of projects that can be used.
-
providers.[openshift].pools
Type: list A pool defines a group of resources from an Openshift provider.
-
providers.[openshift].pools.name (required)
Project’s name are prefixed with the pool’s name.
-
providers.[openshift].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.[openshift].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.[openshift].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.[openshift].pools.labels.name (required)
Identifier for this label; references an entry in the labels section.
-
providers.[openshift].pools.labels.type
The Openshift provider supports two types of labels:
- project
Project labels provide an empty project configured with a service account that can create pods, services, configmaps, etc.
- pod
Pod labels provide a new dedicated project with a single pod created using the providers.[openshift].pools.labels.image parameter and it is configured with a service account that can exec and get the logs of the pod.
-
providers.[openshift].pools.labels.image
Only used by the pod label type; specifies the image name used by the pod.
-
providers.[openshift].pools.labels.image-pull
Default:IfNotPresent
Type: str The ImagePullPolicy, can be IfNotPresent, Always or Never.
-
providers.[openshift].pools.labels.image-pull-secrets
Default:[]
Type: list The imagePullSecrets needed to pull container images from a private registry.
Example:
labels: - name: openshift-pod image: docker.io/fedora:28 image-pull-secrets: - name: registry-secret
-
providers.[openshift].pools.labels.python-path
Default:auto
Type: str 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.[openshift].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 image 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.[openshift].pools.labels.cpu
Type: int Only used by the pod label type; specifies the number of cpu to request for the pod.
-
providers.[openshift].pools.labels.memory
Type: int Only used by the pod label type; specifies the amount of memory in MiB to request for the pod.
-
providers.[openshift].pools.labels.env
Default:[]
Type: list Only used by the pod label type; A list of environment variables to pass to the Pod.
-
providers.[openshift].pools.labels.env.name (required)
Type: str The name of the environment variable passed to the Pod.
-
providers.[openshift].pools.labels.env.value (required)
Type: str The value of the environment variable passed to the Pod.
-
providers.[openshift].pools.labels.env.name (required)
-
providers.[openshift].pools.labels.name (required)
-
providers.[openshift].pools.name (required)
-
providers.[openshift].context (required)