Skip to content

Kubernetes variables not available for only/except evaluation on first deployment of managed cluster

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30711#note_196827152:

When a managed cluster is deployed to for the first time for a given namespace, using only/except with Kubernetes variables such as $KUBECONFIG and $KUBE_NAMESPACE will not work as these variables are not defined yet. This is because the Kubernetes namespace is created right before the deployment job starts, which is long after these initial variables are generated.

This is only a problem for managed clusters, and only for the first deployment.