change sync options handling

This commit is contained in:
2024-05-22 15:57:04 -05:00
parent a38906d4cc
commit 86ec847cfc
2 changed files with 9 additions and 33 deletions

View File

@@ -39,11 +39,9 @@ spec:
ignoreDifferences: ignoreDifferences:
{{- toYaml $stack.ignoreDifferences | nindent 8 }} {{- toYaml $stack.ignoreDifferences | nindent 8 }}
syncPolicy: syncPolicy:
{{- if $stack.syncPolicy.automated.enabled }}
automated: automated:
prune: {{ $stack.syncPolicy.automated.prune | default false }} prune: {{ $stack.syncPolicy.automated.prune | default false }}
selfHeal: {{ $stack.syncPolicy.automated.selfHeal | default false }} selfHeal: {{ $stack.syncPolicy.automated.selfHeal | default false }}
{{- end }}
retry: retry:
limit: 3 limit: 3
backoff: backoff:
@@ -51,5 +49,8 @@ spec:
factor: 2 factor: 2
maxDuration: 15m maxDuration: 15m
syncOptions: syncOptions:
{{- toYaml $stack.syncPolicy.syncOptions | nindent 10 }} - CreateNamespace={{ $stack.syncPolicy.syncOptions.createNamespace | default true }}
- ApplyOutOfSyncOnly={{ $stack.syncPolicy.syncOptions.applyOutOfSyncOnly | default true }}
- ServerSideApply={{ $stack.syncPolicy.syncOptions.serverSideApply | default false }}
- PruneLast={{ $stack.syncPolicy.syncOptions.pruneLast | default true }}
{{- end }} {{- end }}

View File

@@ -7,37 +7,22 @@ applicationSet:
- name: applications - name: applications
syncPolicy: syncPolicy:
automated: automated:
enabled: true
prune: true prune: true
selfheal: false
syncOptions: syncOptions:
- CreateNamespace=true createNamespace: true
- ApplyOutOfSyncOnly=true
- ServerSideApply=false
- PruneLast=true
- name: deployment - name: deployment
namespace: argocd namespace: argocd
syncPolicy: syncPolicy:
automated: automated:
enabled: true
prune: true prune: true
selfheal: false
syncOptions: syncOptions:
- CreateNamespace=true createNamespace: true
- ApplyOutOfSyncOnly=true
- ServerSideApply=false
- PruneLast=true
- name: platform - name: platform
syncPolicy: syncPolicy:
automated: automated:
enabled: true
prune: true prune: true
selfheal: false
syncOptions: syncOptions:
- CreateNamespace=true serverSideApply: true
- ApplyOutOfSyncOnly=true
- ServerSideApply=true
- PruneLast=true
- name: services - name: services
ignoreDifferences: ignoreDifferences:
- group: "" - group: ""
@@ -46,25 +31,15 @@ applicationSet:
- .status.loadBalancer.ingress[].ipMode - .status.loadBalancer.ingress[].ipMode
syncPolicy: syncPolicy:
automated: automated:
enabled: true
prune: true prune: true
selfheal: false
syncOptions: syncOptions:
- CreateNamespace=true serverSideApply: true
- ApplyOutOfSyncOnly=true
- ServerSideApply=true
- PruneLast=true
- name: storage - name: storage
syncPolicy: syncPolicy:
automated: automated:
enabled: true
prune: true prune: true
selfheal: false
syncOptions: syncOptions:
- CreateNamespace=true createNamespace: true
- ApplyOutOfSyncOnly=true
- ServerSideApply=false
- PruneLast=true
application: application:
cilium: cilium:
namespace: kube-system namespace: kube-system