Open jessesuen opened 5 years ago
Need syntax to support all of the following cases during argocd app sync
:
Here is the proposed syntax. We would introduce a syncOptions
feature to support this. The first option would be ConfigGC=true|false
CLI:
argocd app sync
Spec:
spec:
syncPolicy:
automated: {}
CLI:
argocd app sync -o ConfigGC=true
Spec:
spec:
syncPolicy:
automated:
syncOptions:
- ConfigGC=true
CLI:
argocd app sync --prune -o ConfigGC=false
Spec:
spec:
syncPolicy:
automated:
prune: true
syncOptions:
- ConfigGC=false
CLI:
argocd app sync --prune
Spec:
spec:
syncPolicy:
automated:
prune: true
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Did we fix this with sync-options? https://argoproj.github.io/argo-cd/user-guide/sync-options/#no-prune-resources
👍
Is there any workaround for such garbage collecting?
Is there any progress?
would you accept a PR for this?
Spawned from: https://github.com/argoproj/argo-cd/issues/1629
It may be desirable for Argo CD to have GC controls on ConfigMaps/Secrets which are no longer referenced, to complement the feature in https://github.com/argoproj/argo-cd/issues/1629, which ignores "extra" resources in a namespace.
One proposal is to introduce a new sync option: --prune-unreferenced-config at the API and spec level:
The CLI to enable this command might be something like:
For declarative app specs which desire to have this happen automatically as part of auto-sync, the spec addition would be:
The way pruneUnreferencedConfig would work is, when set to true: