Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: "repctl cluster inject --use-sa" doesn't work for Kubernetes 1.24 and above #463

Closed
seanzhan2014 opened this issue Sep 7, 2022 · 2 comments
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

Comments

@seanzhan2014
Copy link

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

@seanzhan2014 seanzhan2014 added needs-triage Issue requires triage. type/bug Something isn't working. This is the default label associated with a bug issue. labels Sep 7, 2022
@coulof
Copy link
Collaborator

coulof commented Sep 7, 2022

@team,
The request is to :

  1. Update the documentation to create a proper account
  2. Patch to repctl cluster inject --use-sa to self generate the accounts

We can not ask the user to change a feature gate.

@hoppea2 hoppea2 added the area/csm-replication Issue pertains to the CSM Replication module label Oct 17, 2022
@harshaatdell harshaatdell added backlog and removed needs-triage Issue requires triage. labels Oct 19, 2022
@shaynafinocchiaro shaynafinocchiaro added this to the v1.5.0 milestone Nov 14, 2022
@falfaroc
Copy link

falfaroc commented Dec 7, 2022

In the upcoming release, installing csm-replication on the clusters using the installation script will solve the ./repctl cluster inject --use-sa issue.

In a future release, the above issue will be addressed via the installation of the replication controller using repctl path (step 3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

6 participants