[BUG]: "repctl cluster inject --use-sa" doesn't work for Kubernetes 1.24 and above #463
Labels
area/csm-replication
Issue pertains to the CSM Replication module
type/bug
Something isn't working. This is the default label associated with a bug issue.
Milestone
Bug Description
Since Kubernetes 1.24, the default service account won't be generated automatically, unless feature gate LegacyServiceAccountTokenNoAutoGeneration is disabled. https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md
Because of this change, "repctl cluster inject --use-sa" doesn't work for Kubernetes 1.24 and later version.
Logs
[root@k8s-n1 csm-replication]# repctl cluster inject --use-sa
[2022-09-06 21:11:16] INFO Generating config maps from existing service accounts
[2022-09-06 21:11:16] INFO Generating config for service account in site-n1 cluster
Compiling kubeconfig for "default" [ OK ]
Extracting secret [ OK ]
Extracting token Error from server (NotFound): secrets "" not found
[ FAIL ]
[2022-09-06 21:11:16] INFO
[2022-09-06 21:11:16] INFO Generating config for service account in site-n2 cluster
Compiling kubeconfig for "default" [ OK ]
Extracting secret [ OK ]
Extracting token Error from server (NotFound): secrets "" not found
[ FAIL ]
Screenshots
No response
Additional Environment Information
No response
Steps to Reproduce
Run "repctl cluster inject --use-sa" on Kubernetes 1.24 or later version.
Expected Behavior
"repctl cluster inject --use-sa" still able to process.
CSM Driver(s)
CSM 1.3
Installation Type
No response
Container Storage Modules Enabled
csm-replication
Container Orchestrator
Kubernetes 1.24
Operating System
CentOS7
The text was updated successfully, but these errors were encountered: