-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
ArgoCD losing some of its settings after re-running cluster.yml #10846
Comments
I personally would go with 1, in the direction of #6400 . Maybe server apply could help us in this case, but that's not available in the custom kube.py module of kubespray. @floryut @yankay : I propose the following: let's give us some delay to see if anyone come forward to support properly the ArgoCD addon, if not, delete it. (before 2.25 at the latest). Wdyt ? |
#10909 (comment) |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What happened?
After re-running
cluster.yml
(with or without--tags=argocd
), ArgoCD gets reinstalled each time from the upstream all-in-oneinstall.yaml
file:install.yaml
contains various resource definitions, among which severalConfigMap
resources. Some of these (e.g.argocd-ssh-known-hosts-cm
,argocd-cm
) are used for storing applications state which the ArgoCD administrator may wish to change.argocd-ssh-known-hosts-cm
is certainly used by people who wish to connect ArgoCD to their own private git repositories running on a self-hosted server.argocd-cm
may be adjusted by people with more special Ingress, to work around Why is my application stuck in Progressing state?, as described here and here.Re-running Kubespray having the side-effect of rebuilding these
ConfigMap
objects and losing data is unexpected.What did you expect to happen?
This may be a bit of an upstream documentation problem as well. The Upgrading guide for ArgoCD does not state that one is supposed to backup the ArgoCD settings each time versions are switched (or the same version is re-applied). It hints that during major version upgrades it's recommended to take a backup as described on the Disaster Recovery documentation. It's not explicitly clear that
ConfigMap
-stored settings will always be lost when runninginstall.yaml
, regardless of whether you're upgrading at all or reinstalling the same version.It seems like the proper way to upgrade ArgoCD is to always:
install.yaml
for the new versionUnless I'm misunderstanding something, I believe the ArgoCD Upgrading/Overview documentation should be updated to reflect this.
Nevertheless, given that Kubespray supports an ArgoCD addon, it also becomes Kubespray's problem how this addon is managed.
Because this ArgoCD addon is tricky to upgrade and Kubespray includes it as a supported component, I believe one of the following needs to be done:
cluster.yml
would not cause data loss and it won't be Kubespray's problem anymore.*.yaml
) are dumped to the first control plane node (/etc/kubernetes/addons/..
). This node already has akubeconfig
file with admin access. The playbook may detect the existence of ArgoCD, perform backup procedures by running containers as described in Disaster Recovery, then run ArgoCD's all-in-oneinstall.yaml
like it does now, then restore from backup and finally clean up the local backups.How can we reproduce it (as minimally and precisely as possible)?
argocd_enabled: true
+argocd_admin_password: ...
)cluster.yml
(orcluster.yml --tags=argocd
) to get it installed1234
:kubectl port-forward -n argocd service/argocd-server 1234:80
admin
and the password specified inargocd_admin_password
argocd-ssh-known-hosts-cm
ConfigMap:kubectl -n argocd describe cm argocd-ssh-known-hosts-cm | grep example.com
cluster.yml
(orcluster.yml --tags=argocd
) once again. We have not changed the ArgoCD version in the inventory or done any other changes.argocd-ssh-known-hosts-cm
ConfigMap) got reset to their default initial values as seen in the upstreaminstall.yaml
all-in-one file.kubectl -n argocd describe cm argocd-ssh-known-hosts-cm | grep example.com
Example SSH host key that may be added during this test:
This example SSH host key is actually one of the
github.com
SSH host keys. We have to use some vaid base64-encoded data for ArgoCD to accept it, so using something real seemed like the best choice.OS
Irrelevant
Version of Ansible
I'm running the container image for the
v2.24
release (quay.io/kubespray/kubespray:v2.24
):Version of Python
Python 3.10.12
Version of Kubespray (commit)
64447e7
Network plugin used
calico
Full inventory with variables
No response
Command used to invoke ansible
No response
Output of ansible run
No response
Anything else we need to know
No response
The text was updated successfully, but these errors were encountered: