Open runderwoodcr14 opened 1 year ago
I faced the same issue and adding init stage to argocd-vault-plugin-helm.yaml fixed the issue for me
I'm installing argo-cd with dependencies and committed Chart.lock file on the repo as well
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: argocd-vault-plugin-helm
spec:
allowConcurrency: true
discover:
find:
command:
- sh
- "-c"
- "find . -name 'Chart.yaml' && find . -name 'values.yaml'"
init:
command:
- bash
- "-c"
- |
helm repo add argo https://argoproj.github.io/argo-helm
helm dependency build
generate:
command:
- bash
- "-c"
- |
helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE -f <(echo "$ARGOCD_ENV_HELM_VALUES") . |
argocd-vault-plugin generate -s argo-cd:argocd-vault-plugin-credentials -
lockRepo: false
I believe I am facing a similar issue. Intermittently some of my argocd applications are being deleted and recreated. The only way I was able to tell this is the case is because customresource definitions inside of the applications being deleted are stuck in a deleting state.
@hashanmp could you explain how you identified your workaround as a solution? I don't quite see how it triages the problem.
@acelinkit in my case applications got deleted because its creating empty templates files on generate
section.
helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE -f <(echo "$ARGOCD_ENV_HELM_VALUES") . |
argocd-vault-plugin generate -s argo-cd:argocd-vault-plugin-credentials-$ARGOCD_APP_NAMESPACE -
so i had to add helm repo add argo https://argoproj.github.io/argo-helm
to init
and remove the chart.lock file from charts directory.
But now i have remove the find
section from CMP and calling this plugin from only apps needed the plugin.
source:
plugin:
name: argocd-vault-plugin-helm
apiVersion: argoproj.io/v1alpha1
kind: ConfigManagementPlugin
metadata:
name: argocd-vault-plugin-helm
spec:
allowConcurrency: true
init:
command:
- bash
- "-c"
- |
helm dependency update .
generate:
command:
- bash
- "-c"
- |
helm template $ARGOCD_APP_NAME -n $ARGOCD_APP_NAMESPACE -f <(echo "$ARGOCD_ENV_HELM_VALUES") . |
argocd-vault-plugin generate -s argo-cd:argocd-vault-plugin-credentials -
lockRepo: false
Checklist:
argocd version
.Describe the bug
I'm having a very weird problem, I'm running argocd v2.5.10 installed via the helm chart version 5.19.15, my argocd is a self managed deployment. I know that the avp support for configmap has been pushed to v2.7, however I decided that it was better to adopt the change and move to avp sidecar, so I went ahead and modified the helm chart, removed the avp plugin from the configmap and added the new sidecar configuration, pushed the changes to the repository and argo triggered a sync, all applications using avp had no problems moving to the new avp with the sidecar but argocd, I'm using avp with argocd itself to get access to our google cloud secret manager to pull secrets for connecting to the repositories, adding clusters, webhooks, etc.., that shouldn't be a problem I believe, because before the change, I was using avp as well in the same way to get credentials from gcp secret manager, now argocd is out of sync and any resources when I try to sync it doesn't update the resources, plus if I see each of the resources diff(which by the way are all the argocd resources) it shows that is
OutOfSync (requires pruning)
. When trying to see the diff, I can only see the live manifest and it doesn't show the desired manifest, which it will render in fully removing argocd. I did a force sync and indeed argocd was removed, I deployed again argocd and all the applications just to find that the problem is still there, the only difference I can find is the avp sidecar but not sure what else can be.To Reproduce old config using avp via configmap argo-cd helm values.yaml file
argocd-apps helm values.yaml file
The new configuration
argo-cd helm values.yaml file
argocd-apps helm values.yaml file
Expected behavior selfmanaged argocd sync should not delete itself
Screenshots
Version
argocd v2.5.10+d311fad helm chart v5.19.15 Logs