gitlab provided $KUBECONFIG in ci is not following $KUBE_NAMESPACE
Summary
kubernetes account provided in KUBECONFIG is not in the right namespace when setting namespace with KUBE_NAMESPACE in CI settings
Steps to reproduce
Add a RBAC enabled kubernetes cluster to your project
Set up $KUBE_NAMESPACE to whatever existing namespace in your kubernetes cluster.
set up a CI stage with an environment :
and try to apply a file in the cluster : kubectl apply -f ./file.yml --namespace $KUBE_NAMESPACE
What is the current bug behavior?
user provided in $KUBECONFIG has no edit right in the $KUBE_NAMESPACE
What is the expected correct behavior?
namespace should be $KUBE_NAMESPACE and this token should have edit rights in $KUBE_NAMESPACE
Relevant logs and/or screenshots
see previous screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
This bug happens on GitLab.com
Results of GitLab application Check
This bug happens on GitLab.com