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:
{{- toYaml $stack.ignoreDifferences | nindent 8 }}
syncPolicy:
{{- if $stack.syncPolicy.automated.enabled }}
automated:
prune: {{ $stack.syncPolicy.automated.prune | default false }}
selfHeal: {{ $stack.syncPolicy.automated.selfHeal | default false }}
{{- end }}
retry:
limit: 3
backoff:
@@ -51,5 +49,8 @@ spec:
factor: 2
maxDuration: 15m
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 }}

View File

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