Discourage users from setting KUBE_NAMESPACE in our docs
Context in https://gitlab.com/gitlab-org/gitlab-ce/issues/66927#note_212670255 :
In summary setting this variable is a bad idea as it will not be used by GitLab when fetching deploy boards, web terminals, pod logs and any other GitLab feature that loads your application data from the cluster. It only works for your CI job doing the deployment but then everything else stops working and it's confusing.
I can see 2 references telling people they can configure this CI variable and we should probably explicitly state that users should not do this.
I can see bad references at:
-
https://docs.gitlab.com/ee/user/project/clusters/#gitlab-managed-clusters (should just be removed from docs)
If you are using Auto DevOps, you will need to explicitly provide the KUBE_NAMESPACE deployment variable that will be used by your deployment jobs, otherwise a namespace will be created for you.
-
https://docs.gitlab.com/ee/user/project/clusters/#deployment-variables (should be changed to warn users against trying to overwrite this)
You can overwrite it to use different one if needed, otherwise the KUBE_NAMESPACE variable will receive the default value.