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

Option to change namespace for "argocd-manager" ServiceAccount #1595

Closed
wecger opened this issue May 9, 2019 · 4 comments
Closed

Option to change namespace for "argocd-manager" ServiceAccount #1595

wecger opened this issue May 9, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@wecger
Copy link
Contributor

wecger commented May 9, 2019

Issue:
Right now the argocd CLI always wants to add the ServiceAccount to the namespace kube-system. If you are running in an environment which limits the access to the kube-system namespace this might not be possible.

Suggested solution:
Add a switch to the argocd CLI and argocd cluster configuration to modify the namespace where the "argocd-manager" gets installed/looked up

@wecger wecger added the enhancement New feature or request label May 9, 2019
@jessesuen
Copy link
Member

Even today, it's actually fine to choose a different name for the service account, but just not convenient since the CLI does not have a flag to support it. A long as a valid token is inputted into Argo CD, it will work.

@jannfis
Copy link
Member

jannfis commented May 18, 2019

As I'd also like to see this proposed enhancement in ArgoCD (we do work with a lot of clusters that do not allow us to create objects in kube-system namespace), I have hacked together the following change (and learned a little Go and a little more about ArgoCD on the way):

  • the --sa-namespace switch to argocd's "cluster add" command for specifying the namespace to create argocd-manager SystemAccount object at when adding a cluster via CLI (tested on my local cluster)
  • extension to server API's CreateFromKubeConfig() method to support specifying namespace where the SystemAccount object will be created when adding a cluster via API (untested)

The change should be non-breaking since specifying namespace name is optional. If not given, the previous value "kube-system" will be used as a default.

I hope I caught all places this might affect. The changes are there for review at my forked repository in the branch sa-namespace-feature (https://github.com/jannfis/argo-cd/tree/sa-namespace-feature). If you are interested, I'll happily send in a pull request.

@alexec
Copy link
Contributor

alexec commented Jun 10, 2019

Can this now be closed, or is more work needed?

@alexec
Copy link
Contributor

alexec commented Jun 18, 2019

No reply. Closing.

@alexec alexec closed this as completed Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants