zuul/zuul/executor
Benjamin Schanzel f928fb2d15 Fix Multi Node Builds with k8s Build Nodes
Multi-node builds are an explicit feature of Zuul, but are currently
broken with k8s/OpenShift Pod nodes.
Nodepool spawns each k8s pod in its own separate namespace, with
separate service accounts and contexts.
Ansible handles the connection to k8s pods via its kubectl connection
plugin and allows to play against pods in separate contexts via the
`ansible_kubectl_context` host var.
However, Zuul misses to set this host var, defaulting to the
`default-context` of the kubeconfig it prepares for the build.
This leads to a situation where Ansible tries to play each task against
the same pod instead of the ones specified by the respective task.
This change fixes this by setting the `ansible_kubectl_context` host
vars in the inventory accordingly.

Also, the preparation of the executors kubeconfig is error-prone as it
adds multiple clusters with the same name to the config file. This leads
to errors when kubectl evaluates its config.
This change therefore makes sure that a cluster is added only once.

Change-Id: I8e31f2ab209be5b3fef565901f7aa16b00ab93f6
2020-08-17 16:15:36 +02:00
..
sensors Enable starting executors in paused mode 2019-11-04 13:13:38 +01:00
__init__.py Rename zuul-launcher to zuul-executor 2017-03-15 12:21:24 -04:00
client.py Report retried builds in a build set via mqtt. 2020-04-09 11:57:29 +02:00
server.py Fix Multi Node Builds with k8s Build Nodes 2020-08-17 16:15:36 +02:00