-
Notifications
You must be signed in to change notification settings - Fork 561
Closed
Labels
Description
📜 Description
I have an existing cluster added in Devtron using a DNS name. I recently changed the DNS to point to a new cluster API server. When I attempt to update the bearer token in Devtron, I encounter the following error: "Unauthorized: Token seems invalid or does not have sufficient permissions.
{"level":"error","ts":1717694846.591179,"caller":"k8s/K8sUtil.go:545","msg":"error in getting livez call","err":"the server has asked for the client to provide credentials","clusterName":"xxxxxx-devtron","stacktrace":"github.com/devtron-labs/common-lib/utils/k8s.K8sServiceImpl.DiscoveryClientGetLiveZCall\n\t/go/src/github.com/devtron-labs/devtron/vendor/github.com/devtron-labs/common-lib/utils/k8s/K8sUtil.go:545\ngithub.com/devtron-labs/devtron/pkg/cluster.ClusterServiceImpl.CheckIfConfigIsValidAndGetServerVersion\n\t/go/src/github.com/devtron-labs/devtron/pkg/cluster/ClusterService.go:834\ngithub.com/devtron-labs/devtron/pkg/cluster.
{"level":"error","ts":1717694846.591232,"caller":"cluster/ClusterRestHandler.go:476","msg":"service err, Update","error":"Unauthorized : token seems invalid or does not have sufficient permissions","payload":{"id":27,"cluster_name":"xxxxx-devtron","description":"","server_url":"https://xxxxxx.xxxxxx.devtron.ai:16443","active":true,"config":
👟 Reproduction steps
- Add a cluster using a DNS name (instead of adding directly, as the DNS name is a primary key in ArgoCD).
- Successfully add the cluster for the first time.
- Change the API server DNS to point to the new API server.
- Attempt to update the existing cluster bearer token in Devtron with a new bearer token.
Devtron does not allow the existing cluster bearer token to be edited and throws an error indicating that the token seems invalid or lacks sufficient permissions.
👍 Expected behavior
It should be edit without any error Unauthorized : token seems invalid or does not have sufficient permissions
👎 Actual Behavior
It is throwing error
☸ Kubernetes version
1.28
Cloud provider
Details
aws🌍 Browser
Chrome
🧱 Your Environment
No response
✅ Proposed Solution
No response
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find any similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
AB#9953