From 89f8d7a00071671b78f440fc5bb991f0b83957b0 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 25 Jan 2023 11:07:52 -0800 Subject: [PATCH] Fix openshift doc attribute hierarchy The entire provider.pools.labels configuration attribute hierarchy was outdented one level in the openshift and openshiftpods documentation, causing it to incorrectly appear as provider.labels. This change corrects this and any existing references. Change-Id: I6b682a05bc1d7622038ea6c62935259f0cffc585 --- doc/source/openshift-pods.rst | 174 +++++++++++++------------ doc/source/openshift.rst | 232 +++++++++++++++++----------------- 2 files changed, 202 insertions(+), 204 deletions(-) diff --git a/doc/source/openshift-pods.rst b/doc/source/openshift-pods.rst index 199976f1f..7168ee550 100644 --- a/doc/source/openshift-pods.rst +++ b/doc/source/openshift-pods.rst @@ -81,105 +81,103 @@ Selecting the openshift pods driver adds the following options to the 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. - .. attr:: 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 - - .. attr:: name - :required: - - Identifier for this label; references an entry in the - :attr:`labels` section. - - .. attr:: image - - The image name. - - .. attr:: image-pull - :default: IfNotPresent - :type: str - - The ImagePullPolicy, can be IfNotPresent, Always or Never. - - .. attr:: image-pull-secrets - :default: [] + .. attr:: labels :type: list - The imagePullSecrets needed to pull container images from a private - registry. + Each entry in a pool`s `labels` section indicates that the + corresponding label is available for use in this pool. - Example: - - .. code-block:: yaml - - labels: - - name: openshift-pod - type: pod - image: docker.io/fedora:28 - image-pull-secrets: - - name: registry-secret - - .. attr:: cpu - :type: int - - The number of cpu to request for the pod. - - .. attr:: memory - :type: int - - The amount of memory in MB to request for the pod. - - .. attr:: python-path - :type: str - :default: auto - - The path of the default python interpreter. Used by Zuul to set - ``ansible_python_interpreter``. The special value ``auto`` 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. - - .. attr:: shell-type - :type: str - :default: sh - - The shell type of the node's default shell executable. Used by Zuul - to set ``ansible_shell_type``. This setting should only be used - - - For a windows pod with the experimental `connection-type` - ``ssh``, in which case ``cmd`` or ``powershell`` should be set - and reflect the node's ``DefaultShell`` configuration. - - If the default shell is not Bourne compatible (sh), but instead - e.g. ``csh`` or ``fish``, and the user is aware that there is a - long-standing issue with ``ansible_shell_type`` in combination - with ``become`` - - .. attr:: env - :type: list - :default: [] - - A list of environment variables to pass to the Pod. + Each entry is a dictionary with the following keys .. attr:: name - :type: str :required: - The name of the environment variable passed to the Pod. + Identifier for this label; references an entry in the + :attr:`labels` section. - .. attr:: value + .. attr:: image + + The image name. + + .. attr:: image-pull + :default: IfNotPresent :type: str - :required: - The value of the environment variable passed to the Pod. + The ImagePullPolicy, can be IfNotPresent, Always or Never. - .. attr:: node-selector - :type: dict + .. attr:: image-pull-secrets + :default: [] + :type: list - A map of key-value pairs to ensure the OpenShift scheduler - places the Pod on a node with specific node labels. + The imagePullSecrets needed to pull container images from a private + registry. + Example: + .. code-block:: yaml + + labels: + - name: openshift-pod + type: pod + image: docker.io/fedora:28 + image-pull-secrets: + - name: registry-secret + + .. attr:: cpu + :type: int + + The number of cpu to request for the pod. + + .. attr:: memory + :type: int + + The amount of memory in MB to request for the pod. + + .. attr:: python-path + :type: str + :default: auto + + The path of the default python interpreter. Used by Zuul to set + ``ansible_python_interpreter``. The special value ``auto`` 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. + + .. attr:: shell-type + :type: str + :default: sh + + The shell type of the node's default shell executable. Used by Zuul + to set ``ansible_shell_type``. This setting should only be used + + - For a windows pod with the experimental `connection-type` + ``ssh``, in which case ``cmd`` or ``powershell`` should be set + and reflect the node's ``DefaultShell`` configuration. + - If the default shell is not Bourne compatible (sh), but instead + e.g. ``csh`` or ``fish``, and the user is aware that there is a + long-standing issue with ``ansible_shell_type`` in combination + with ``become`` + + .. attr:: env + :type: list + :default: [] + + A list of environment variables to pass to the Pod. + + .. attr:: name + :type: str + :required: + + The name of the environment variable passed to the Pod. + + .. attr:: value + :type: str + :required: + + The value of the environment variable passed to the Pod. + + .. attr:: 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. diff --git a/doc/source/openshift.rst b/doc/source/openshift.rst index df6f5ed4e..8494853c5 100644 --- a/doc/source/openshift.rst +++ b/doc/source/openshift.rst @@ -18,7 +18,7 @@ Selecting the openshift driver adds the following options to the An Openshift provider's resources are partitioned into groups called `pool` (see :attr:`providers.[openshift].pools` for details), and within a pool, the node types which are to be made available are listed - (see :attr:`providers.[openshift].labels` for details). + (see :attr:`providers.[openshift].pools.labels` for details). .. note:: For documentation purposes the option names are prefixed ``providers.[openshift]`` to disambiguate from other @@ -98,130 +98,130 @@ Selecting the openshift driver adds the following options to the 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. - .. attr:: 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 - - .. attr:: name - :required: - - Identifier for this label; references an entry in the - :attr:`labels` section. - - .. attr:: type - - The Openshift provider supports two types of labels: - - .. value:: project - - Project labels provide an empty project configured - with a service account that can create pods, services, - configmaps, etc. - - .. value:: pod - - Pod labels provide a new dedicated project with a single - pod created using the - :attr:`providers.[openshift].labels.image` parameter and it - is configured with a service account that can exec and get - the logs of the pod. - - .. attr:: image - - Only used by the - :value:`providers.[openshift].labels.type.pod` label type; - specifies the image name used by the pod. - - .. attr:: image-pull - :default: IfNotPresent - :type: str - - The ImagePullPolicy, can be IfNotPresent, Always or Never. - - .. attr:: image-pull-secrets - :default: [] + .. attr:: labels :type: list - The imagePullSecrets needed to pull container images from a private - registry. + Each entry in a pool`s `labels` section indicates that the + corresponding label is available for use in this pool. - Example: - - .. code-block:: yaml - - labels: - - name: openshift-pod - image: docker.io/fedora:28 - image-pull-secrets: - - name: registry-secret - - .. attr:: python-path - :type: str - :default: auto - - The path of the default python interpreter. Used by Zuul to set - ``ansible_python_interpreter``. The special value ``auto`` 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. - - .. attr:: shell-type - :type: str - :default: sh - - The shell type of the node's default shell executable. Used by Zuul - to set ``ansible_shell_type``. This setting should only be used - - - For a windows image with the experimental `connection-type` - ``ssh``, in which case ``cmd`` or ``powershell`` should be set - and reflect the node's ``DefaultShell`` configuration. - - If the default shell is not Bourne compatible (sh), but instead - e.g. ``csh`` or ``fish``, and the user is aware that there is a - long-standing issue with ``ansible_shell_type`` in combination - with ``become`` - - .. attr:: cpu - :type: int - - Only used by the - :value:`providers.[openshift].labels.type.pod` label type; - specifies the number of cpu to request for the pod. - - .. attr:: memory - :type: int - - Only used by the - :value:`providers.[openshift].labels.type.pod` label type; - specifies the amount of memory in MiB to request for the pod. - - .. attr:: env - :type: list - :default: [] - - Only used by the - :value:`providers.[openshift].labels.type.pod` label type; - A list of environment variables to pass to the Pod. + Each entry is a dictionary with the following keys .. attr:: name - :type: str :required: - The name of the environment variable passed to the Pod. + Identifier for this label; references an entry in the + :attr:`labels` section. - .. attr:: value + .. attr:: type + + The Openshift provider supports two types of labels: + + .. value:: project + + Project labels provide an empty project configured + with a service account that can create pods, services, + configmaps, etc. + + .. value:: pod + + Pod labels provide a new dedicated project with a single + pod created using the + :attr:`providers.[openshift].pools.labels.image` parameter and it + is configured with a service account that can exec and get + the logs of the pod. + + .. attr:: image + + Only used by the + :value:`providers.[openshift].pools.labels.type.pod` label type; + specifies the image name used by the pod. + + .. attr:: image-pull + :default: IfNotPresent :type: str - :required: - The value of the environment variable passed to the Pod. + The ImagePullPolicy, can be IfNotPresent, Always or Never. - .. attr:: node-selector - :type: dict + .. attr:: image-pull-secrets + :default: [] + :type: list - Only used by the - :value:`providers.[openshift].labels.type.pod` label type; - A map of key-value pairs to ensure the OpenShift scheduler - places the Pod on a node with specific node labels. + The imagePullSecrets needed to pull container images from a private + registry. + + Example: + + .. code-block:: yaml + + labels: + - name: openshift-pod + image: docker.io/fedora:28 + image-pull-secrets: + - name: registry-secret + + .. attr:: python-path + :type: str + :default: auto + + The path of the default python interpreter. Used by Zuul to set + ``ansible_python_interpreter``. The special value ``auto`` 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. + + .. attr:: shell-type + :type: str + :default: sh + + The shell type of the node's default shell executable. Used by Zuul + to set ``ansible_shell_type``. This setting should only be used + + - For a windows image with the experimental `connection-type` + ``ssh``, in which case ``cmd`` or ``powershell`` should be set + and reflect the node's ``DefaultShell`` configuration. + - If the default shell is not Bourne compatible (sh), but instead + e.g. ``csh`` or ``fish``, and the user is aware that there is a + long-standing issue with ``ansible_shell_type`` in combination + with ``become`` + + .. attr:: cpu + :type: int + + Only used by the + :value:`providers.[openshift].pools.labels.type.pod` label type; + specifies the number of cpu to request for the pod. + + .. attr:: memory + :type: int + + Only used by the + :value:`providers.[openshift].pools.labels.type.pod` label type; + specifies the amount of memory in MiB to request for the pod. + + .. attr:: env + :type: list + :default: [] + + Only used by the + :value:`providers.[openshift].pools.labels.type.pod` label type; + A list of environment variables to pass to the Pod. + + .. attr:: name + :type: str + :required: + + The name of the environment variable passed to the Pod. + + .. attr:: value + :type: str + :required: + + The value of the environment variable passed to the Pod. + + .. attr:: node-selector + :type: dict + + Only used by the + :value:`providers.[openshift].pools.labels.type.pod` label type; + A map of key-value pairs to ensure the OpenShift scheduler + places the Pod on a node with specific node labels.