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

[FEATURE] Make it possible to disable namespace creation for ArgoCD #704

Closed
spkane opened this issue Jun 28, 2022 · 8 comments
Closed

[FEATURE] Make it possible to disable namespace creation for ArgoCD #704

spkane opened this issue Jun 28, 2022 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@spkane
Copy link
Contributor

spkane commented Jun 28, 2022

Is your feature request related to a problem? Please describe

For ArgoCD, I want to make sure the very first refresh, right after the argocd_applications are installed works, but to do this I need to have a few k8s secrets (with this label: "argocd.argoproj.io/secret-type" : "repository") in place so that Argo can read our private Github repos, and to do this, I really need to create the namespace BEFORE the kubernetes-addons module is run, to ensure that the secrets exist in the namespace the very first-time ArgoCD tries to connect to the repos.

Describe the solution you'd like

It would be great to have something like argocd_create_namespace = true as a default that can be overridden. The default behavior is the same as today.

argocd_create_namespace = false would skip the namespace creation here:
https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/modules/kubernetes-addons/argocd/main.tf#L11-L15

and assume that the namespace already exists.

@spkane
Copy link
Contributor Author

spkane commented Jun 28, 2022

I 'd love to take a stab at this and try and get it done this week if folks think that it makes sense.

@spkane spkane changed the title [FEATURE] Make it possible to disable namespace creation for ArgoCD (and maybe all addons) [FEATURE] Make it possible to disable namespace creation for ArgoCD Jun 28, 2022
@bryantbiggs
Copy link
Contributor

#595 is similar but I did not touch argocd yet

@spkane
Copy link
Contributor Author

spkane commented Jun 29, 2022

@bryantbiggs What are the odds that #595 could include ArgoCD as well, and might get merged in this week? I am nearing the end of my current project and am just hoping to get this one last fix in before I move on to other things.

I am wondering if it would make sense to keep this separate and simply focus on making the ArgoCD namespace optional in this issue.

cc/ @vara-bonthu

@bryantbiggs
Copy link
Contributor

yes I left out ArgoCD since its more complex and involved. We still haven't taken a direction on how we are going to handle #595 - I was just referencing since these are all in the same thought process around giving more control around namespaces to users

@bryantbiggs
Copy link
Contributor

@spkane
Copy link
Contributor Author

spkane commented Jun 30, 2022

@bryantbiggs I think that would get the job done. I just need to be able to tell the module not to create the argocd namespace, so that I can pre-create it and then drop a secret and config map into it, before the module runs and installs ArgoCD.

I noticed that you were checking to make sure that the namespace wasn't defined as kube-system. It might be better to just let it fail naturally if the namespace already exists, since there are other namespaces, like default, and some of the others that start with kube- which will also result in a failure, if people supply that as the namespace name, and don't disable the namespace creation.

@bryantbiggs
Copy link
Contributor

@spkane we merged #595 and will be cutting a release tomorrow - let us know if theres anything additional needed here or feel free to close out the issue, thank you!

@spkane
Copy link
Contributor Author

spkane commented Jul 1, 2022

Thank you @bryantbiggs. This got me what I needed.

@spkane spkane closed this as completed Jul 1, 2022
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

3 participants