Skip to content

Commit

Permalink
[#419] fix ArgoCD templates to suppress unnecessary migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ewilkins-csi committed Oct 23, 2024
1 parent 4bff71a commit 629a5d5
Show file tree
Hide file tree
Showing 43 changed files with 44 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- with .Values.spec.syncPolicy }}
Expand All @@ -31,13 +32,10 @@ spec:
automated: {}
{{- end }}
{{- end }}
{{/* This template comment explains how the logic below works*/}}
{{- /* This one trims the newlines so it doesn't affect output */ -}}
#these options are important
syncOptions:
- ServerSideApply=true # https://github.com/argoproj/argo-cd/issues/820#issuecomment-135463693
{{- if .Values.spec.syncPolicy }}
{{- with .Values.spec.syncPolicy.syncOptions }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
destination:
namespace: argocd
server: {{ .Values.spec.destination.server }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
destination:
namespace: argocd
server: {{ .Values.spec.destination.server }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
path: ${projectName}-deploy/src/main/resources/apps/pipeline-invocation-service
repoURL: {{ .Values.spec.repo }}
targetRevision: {{ .Values.spec.targetRevision }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
destination:
namespace: argocd
server: {{ .Values.spec.destination.server }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- with .Values.spec.syncPolicy }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- {{ . }}
{{- end }}
{{ end }}
{{- /* SKIP-MIGRATION: 'argocd-template-sync-policy-configuration-migration' */}}
{{- with .Values.spec.syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
Expand Down

0 comments on commit 629a5d5

Please sign in to comment.