-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Declarative setup and configuration of ArgoCD #536
Comments
@mduarte thanks for the feedback. You bring up an excellent point about the ArgoCD configuration itself not being totally declarative. I think this is important discussion to have and I do think it can improved. Some points to know:
App specs can be created and updated declaratively using
NOTE that this only satisfies part of your concern, since application resources are still created imperatively instead of via git, as well as the cluster/repo secrets, which the API server relies on a naming convention due to k8s restrictions on resource names.
The way that this is used is as follows:
I have also used it like:
|
@jessesuen thanks for the quick reply. I will try to reply to your points and give you some context about our setup so perhaps it will make more sense where I am coming from.
That said, we've tried several tools out there for this task and in my opinion ArgoCD is the most promising! I am here giving this feedback to make ArgoCD even better :) |
I gave a little background about why it is the way it is, here: #527. Basically it boiled down to being able to run argocd services with a less privileged role, so that ArgoCD does not need to run with cluster-admin privileges as a default behavior, especially for the scenarios where ArgoCD is meant to be managing other clusters (not its own cluster). That said, you're the second person to find this behavior a bit jarring. I do think there is room for an installation mode to support the in-cluster use case without the procedural step. Let's use #527 to discuss how to accomplish this. In the end, we will likely need to have an installation mode where we expand role of the application-controller to have cluster-admin privileges, and for the deploy process to presume access when deploying to kubernetes.default.svc.
Believe me, this doesn't sit right with me as well and I think we should find ways to address this. Today's implementation is not friendly to GitOps because of the way we store the credentials with a formulated secret name. The primary reason for the current design is because of the following constraints:
If we can rework the repo and cluster credential management to satisfy the above requirements, in a more GitOps friendly way (without relying on the current secret naming recipe), I think it would be a huge win. One question for you is: how are you dealing with kubernetes secrets and GitOps?
Thanks for the explanation. This really helps us understand the use case better. |
At the moment we are looking at this solution by bitmani: https://github.com/bitnami-labs/sealed-secrets. However, we are also studying other possibilities. |
Repasting from issue #527:
|
Capturing some discussion from slack. The current proposal is that repositories would be configured through the central argocd-configmap. So something like this would exist in the
When a user adds a repository through the API, in the backend, argocd might choose to continue to use the same formula to generate the secret name, but we would not require it like in the current design. The secret would simply need be able to be referenced by it's name in this config file (rather than the formulated name that ArgoCD uses). |
To handle clusters, we will continue to use a secret to store all cluster information, but we will switch to use a better convention for the secret name, which will be friendlier for humans to create outside of ArgoCD API Server. The convention would simply be to use the hostname of the API server, after stripping out the If the cluster address has a port, then we would need swap the colon with a dash. Something like:
|
Implemented |
I am really impressed with the approach that argo-cd has taken to GitOps. It is in my opinion the best implementation of this methodology so far.
However, the argo-cd setup itself is not declarative. I would expect to be able to setup ArgoCD with a single
kubectl apply
with all its resources, configuration and application definitions. ArgoCD would then, from those application definitions and confirations do the rest of the work as soon as it would start up.Ideally it would be possible to have:
Perhaps we could add the necessary serviceaccount/role/bindings necessary for argocd-manager in a declarative way at the same time we
kubectl
apply the argocd deployment.Perhaps we would need a CRD for repos? If the repo is private we could refer to a kubernetes secret with the ssh private key of the repo.
Is there plans to head in this direction and avoid the need of any procedural step to setup ArgoCD?
The text was updated successfully, but these errors were encountered: