Allow Argo to prune old templates

This commit is contained in:
Matt Pryor 2023-02-01 12:18:47 +00:00
parent 7470be3569
commit 612cf8f1b5
3 changed files with 9 additions and 6 deletions

View File

@ -50,7 +50,8 @@ metadata:
# Cluster API complains when old templates disappear before it has rolled all the machines over
# When deploying with Helm, leave the resource behind and let Cluster API clean it up
helm.sh/resource-policy: keep
# Allow Argo to clean up old templates after the cluster has become healthy again
argocd.argoproj.io/sync-options: PruneLast=true
# Allow Argo to clean up old templates by ignoring the non-controller owner references,
# but only after the cluster has become healthy again
argocd.argoproj.io/sync-options: "ControllerReferencesOnly=true,PruneLast=true"
spec:
{{- include "openstack-cluster.controlplane.mt.spec" . | nindent 2 }}

View File

@ -43,8 +43,9 @@ metadata:
# Cluster API complains when old templates disappear before it has rolled all the machines over
# When deploying with Helm, leave the resource behind and let Cluster API clean it up
helm.sh/resource-policy: keep
# Allow Argo to clean up old templates after the cluster has become healthy again
argocd.argoproj.io/sync-options: PruneLast=true
# Allow Argo to clean up old templates by ignoring the non-controller owner references,
# but only after the cluster has become healthy again
argocd.argoproj.io/sync-options: "ControllerReferencesOnly=true,PruneLast=true"
spec:
template:
spec: {{ include "openstack-cluster.nodegroup.kct.spec" (list $ $nodeGroup) | nindent 6 }}

View File

@ -59,7 +59,8 @@ metadata:
# Cluster API complains when old templates disappear before it has rolled all the machines over
# When deploying with Helm, leave the resource behind and let Cluster API clean it up
helm.sh/resource-policy: keep
# Allow Argo to clean up old templates after the cluster has become healthy again
argocd.argoproj.io/sync-options: PruneLast=true
# Allow Argo to clean up old templates by ignoring the non-controller owner references,
# but only after the cluster has become healthy again
argocd.argoproj.io/sync-options: "ControllerReferencesOnly=true,PruneLast=true"
spec: {{ include "openstack-cluster.nodegroup.mt.spec" (list $ $nodeGroup) | nindent 2 }}
{{- end }}