Old kubernetes namespace for renamed project breaks CI
Summary
I renamed a project on our selfhosted gitlab instance (from tmate-slave-config
to tmate-server-config
).
After this, the CI still uses the old KUBE_NAMESPACE
(tmate-slave-config-1885
) and the old KUBE_SERVICE_ACCOUNT
(tmate-slave-config-1885-service-account
).
Since I removed the namespace on our k8s cluster, the CI is in a broken state now:
$ env | grep -v 'TOKEN' | grep -i kube
KUBE_CA_PEM_FILE=/builds/infrared/platform_wg/tmate-server-config.tmp/KUBE_CA_PEM_FILE
KUBECONFIG=/builds/infrared/platform_wg/tmate-server-config.tmp/KUBECONFIG
KUBE_URL=https://…:6443
KUBE_CA_PEM=-----BEGIN CERTIFICATE-----
KUBE_NAMESPACE=tmate-server-config
KUBE_SERVICE_ACCOUNT=tmate-slave-config-1885-service-account
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.7", GitCommit:"65ecaf0671341311ce6aea0edab46ee69f65d59e", GitTreeState:"clean", BuildDate:"2019-01-24T19:32:00Z", GoVersion:"go1.10.7", Compiler:"gc", Platform:"linux/amd64"}
error: You must be logged in to the server (the server has asked for the client to provide credentials)
Steps to reproduce
- Configure group-level k8s CI integration
- Create a project
- Configure CI to run
kubectl version
- It should show the server version
- Rename project
- Run CI again
- CI fails with
error: You must be logged in to the server (the server has asked for the client to provide credentials)
Example Project
(will add later)
What is the current bug behavior?
CI fails with error: You must be logged in to the server (the server has asked for the client to provide credentials)
when running kubectl version
What is the expected correct behavior?
kubectl should show the server version