Convert kubernetes config docs to zuul-sphinx
The rest of the documentation switched to this format while the k8s driver was in development. Change-Id: If39da0a0d51d00f289f6c5efbe9c25f7b07fdf40
This commit is contained in:
parent
4f76e33594
commit
b1e383d127
|
@ -1009,87 +1009,105 @@ Selecting the static driver adds the following options to the
|
||||||
Kubernetes Driver
|
Kubernetes Driver
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
A Kubernetes provider's resources are partitioned into groups called "pool"
|
Selecting the kubernetes driver adds the following options to the
|
||||||
(see :ref:`k8s_pools` for details), and within a pool, the node types which
|
:attr:`providers` section of the configuration.
|
||||||
are to be made available are listed (see :ref:`k8s_labels` for details).
|
|
||||||
|
|
||||||
Example::
|
.. attr-overview::
|
||||||
|
:prefix: providers.kubernetes
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
providers:
|
.. attr:: providers.kubernetes
|
||||||
- name: kubespray
|
:type: list
|
||||||
driver: kubernetes
|
|
||||||
context: admin-cluster.local
|
|
||||||
pools:
|
|
||||||
- name: main
|
|
||||||
labels:
|
|
||||||
- name: kubernetes-namespace
|
|
||||||
type: namespace
|
|
||||||
- name: pod-fedora
|
|
||||||
type: pod
|
|
||||||
image: docker.io/fedora:28
|
|
||||||
|
|
||||||
**required**
|
A Kubernetes provider's resources are partitioned into groups
|
||||||
|
called `pools` (see :attr:`providers.kubernetes.pools` for
|
||||||
|
details), and within a pool, the node types which are to be made
|
||||||
|
available are listed (see :attr:`providers.kubernetes.labels` for
|
||||||
|
details).
|
||||||
|
|
||||||
``context``
|
Note for documentation purposes the option names are prefixed
|
||||||
Name of the context configured in ``kube/config``.
|
``providers.kubernetes`` to disambiguate from other drivers, but
|
||||||
|
the ``kubernetes`` is not required in the configuration (e.g. below
|
||||||
|
``providers.kubernetes.pools`` refers to the ``pools`` key in the
|
||||||
|
``providers`` section when the ``kubernetes`` driver is selected).
|
||||||
|
|
||||||
Before using the driver, Nodepool services need a ``kube/config`` file
|
.. code-block:: yaml
|
||||||
manually installed with cluster admin context.
|
|
||||||
|
|
||||||
**optional**
|
providers:
|
||||||
|
- name: kubespray
|
||||||
``launch-retries``
|
driver: kubernetes
|
||||||
|
context: admin-cluster.local
|
||||||
The number of times to retry launching a node before considering the job
|
pools:
|
||||||
failed.
|
- name: main
|
||||||
|
labels:
|
||||||
Default 3.
|
- name: kubernetes-namespace
|
||||||
|
type: namespace
|
||||||
|
- name: pod-fedora
|
||||||
|
type: pod
|
||||||
|
image: docker.io/fedora:28
|
||||||
|
|
||||||
|
|
||||||
.. _k8s_pools:
|
.. attr:: context
|
||||||
|
:required:
|
||||||
|
|
||||||
Kubernetes Pools
|
Name of the context configured in ``kube/config``.
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
A pool defines a group of resources from a Kubernetes provider. Each pool has a
|
Before using the driver, Nodepool services need a
|
||||||
maximum number of namespace which can be created (Not Implemented yet).
|
``kube/config`` file manually installed with cluster admin
|
||||||
|
context.
|
||||||
|
|
||||||
Example::
|
.. attr:: launch-retries
|
||||||
|
:default: 3
|
||||||
|
|
||||||
pools:
|
The number of times to retry launching a node before considering
|
||||||
- name: main
|
the job failed.
|
||||||
labels: []
|
|
||||||
|
|
||||||
|
|
||||||
**required**
|
.. attr:: pools
|
||||||
|
:type: list
|
||||||
|
|
||||||
``name``
|
A pool defines a group of resources from a Kubernetes
|
||||||
Namespace name are prefixed with the pool's name.
|
provider.
|
||||||
|
|
||||||
|
.. attr:: name
|
||||||
|
:required:
|
||||||
|
|
||||||
.. _k8s_labels:
|
Namespaces are prefixed with the pool's name.
|
||||||
|
|
||||||
Kubernetes Labels
|
.. attr:: labels
|
||||||
^^^^^^^^^^^^^^^^^
|
:type: list
|
||||||
|
|
||||||
Each entry in a pool`s `labels` section indicates that the
|
Each entry in a pool`s `labels` section indicates that the
|
||||||
corresponding label is available for use in this pool.
|
corresponding label is available for use in this pool.
|
||||||
|
|
||||||
Example::
|
Each entry is a dictionary with the following keys
|
||||||
|
|
||||||
labels:
|
.. attr:: name
|
||||||
- name: kubernetes-namespace
|
:required:
|
||||||
type: namespace
|
|
||||||
- name: pod-fedora
|
|
||||||
type: pod
|
|
||||||
image: docker.io/fedora:28
|
|
||||||
|
|
||||||
|
Identifier for this label; references an entry in the
|
||||||
|
:attr:`labels` section.
|
||||||
|
|
||||||
Kubernetes provider support two types of labels:
|
.. attr:: type
|
||||||
|
|
||||||
Namespace labels provide an empty namespace configured with a service account
|
The Kubernetes provider supports two types of labels:
|
||||||
that can creates pods, services, configmaps, ...
|
|
||||||
|
|
||||||
Pod labels provide a dedicated namespace with a single pod created using the
|
.. value:: namespace
|
||||||
``image`` parameter and it is configured with a service account that can
|
|
||||||
exec and get the logs of the pod.
|
Namespace labels provide an empty namespace configured
|
||||||
|
with a service account that can creates pods, services,
|
||||||
|
configmaps, etc.
|
||||||
|
|
||||||
|
.. value:: pod
|
||||||
|
|
||||||
|
Pod labels provide a dedicated namespace with a single pod
|
||||||
|
created using the
|
||||||
|
:attr:`providers.kubernetes.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.kubernetes.labels.type.pod` label type;
|
||||||
|
specifies the image name used by the pod.
|
||||||
|
|
Loading…
Reference in New Issue