Skip to content

Commit

Permalink
Simplified rendering of sha256sum
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick <[email protected]>
  • Loading branch information
pgmgb committed Nov 14, 2024
1 parent 601db54 commit f568502
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ spec:
template:
metadata:
annotations:
checksum/cmd-params: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cmd-params: {{ include "argo-cd.config.params" . | sha256sum }}
{{- if .Values.configs.cm.create }}
checksum/cm: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cm: {{ include "argo-cd.config.cm" . | sha256sum }}
{{- end }}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }}
{{- range $key, $value := . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
template:
metadata:
annotations:
checksum/cmd-params: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cmd-params: {{ include "argo-cd.config.params" . | sha256sum }}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.applicationSet.podAnnotations) }}
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
Expand Down
4 changes: 2 additions & 2 deletions charts/argo-cd/templates/argocd-repo-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ spec:
template:
metadata:
annotations:
checksum/cmd-params: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cmd-params: {{ include "argo-cd.config.params" . | sha256sum }}
{{- if .Values.repoServer.certificateSecret.enabled }}
checksum/repo-server-tls: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-repo-server-tls-secret.yaml") . | fromYaml).data | toYaml | sha256sum }}
{{- end }}
{{- if .Values.configs.cm.create }}
checksum/cm: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cm: {{ include "argo-cd.config.cm" . | sha256sum }}
{{- end }}
{{- if .Values.configs.cmp.create }}
checksum/cmp-cm: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmp-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
Expand Down
4 changes: 2 additions & 2 deletions charts/argo-cd/templates/argocd-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ spec:
template:
metadata:
annotations:
checksum/cmd-params: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cmd-params: {{ include "argo-cd.config.params" . | sha256sum }}
{{- if .Values.configs.cm.create }}
checksum/cm: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cm: {{ include "argo-cd.config.cm" . | sha256sum }}
{{- end }}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.server.podAnnotations) }}
{{- range $key, $value := . }}
Expand Down
6 changes: 3 additions & 3 deletions charts/argo-cd/templates/dex/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ spec:
template:
metadata:
annotations:
checksum/cmd-params: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cmd-params-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cmd-params: {{ include "argo-cd.config.params" . | sha256sum }}
{{- if (index .Values.configs.cm "dex.config") }}
checksum/cm: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-cm.yaml") . | fromYaml).data | toYaml | sha256sum }}
checksum/cm: {{ include "argo-cd.config.cm" . | sha256sum }}
{{- end }}
{{- if .Values.dex.certificateSecret.enabled }}
checksum/dex-server-tls: {{ include (print $.Template.BasePath "/argocd-configs/argocd-dex-server-tls-secret.yaml") . | sha256sum }}
checksum/dex-server-tls: {{ (include (print $.Template.BasePath "/argocd-configs/argocd-dex-server-tls-secret.yaml") . | fromYaml).data | toYaml | sha256sum }}
{{- end }}
{{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }}
{{- range $key, $value := . }}
Expand Down

0 comments on commit f568502

Please sign in to comment.