diff --git a/changelogs/unreleased/ensure_namespace.yml b/changelogs/unreleased/ensure_namespace.yml new file mode 100644 index 00000000000..ce2a615af1f --- /dev/null +++ b/changelogs/unreleased/ensure_namespace.yml @@ -0,0 +1,5 @@ +--- +title: AutoDevops function ensure_namespace() now explicitly tests the namespace +merge_request: 29567 +author: Jack Lei +type: fixed diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml index 1d55c64ec56..dcf8254ef94 100644 --- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml @@ -505,7 +505,7 @@ rollout 100%: } function ensure_namespace() { - kubectl describe namespace "$KUBE_NAMESPACE" || kubectl create namespace "$KUBE_NAMESPACE" + kubectl get namespace "$KUBE_NAMESPACE" || kubectl create namespace "$KUBE_NAMESPACE" } function check_kube_domain() {