Skip to content

Commit d2449ea

Browse files
feat: checksum annotations
1 parent 20d03fd commit d2449ea

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

charts/gitops-runtime/templates/app-proxy/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
{{- $_ := set $appProxyContext.Values "redis" (get .Values "redis") }}
77
{{- $_ := set $appProxyContext.Values "redis-ha" (get .Values "redis-ha") }}
88

9+
{{- $_ := set $appProxyContext.Values.podAnnotations "checksum/config-codefresh-cm" (include (print $.Template.BasePath "/codefresh-cm.yaml") . | sha256sum) }}
10+
{{- $_ := set $appProxyContext.Values.podAnnotations "checksum/config-cap-app-proxy" (include (print $.Template.BasePath "/_components/cap-app-proxy/_config.yaml") . | sha256sum) }}
11+
912
{{/* Merge environment variables with the ones in _app-proxy-env.yaml */}}
1013
{{- $mainContainerMergedValues := mergeOverwrite $appProxyContext.Values.env (include "codefresh-gitops-runtime.app-proxy.calculated-env-vars" . | fromYaml) }}
1114
{{- $_ := set $appProxyContext.Values "env" $mainContainerMergedValues }}

charts/gitops-runtime/templates/argo-gateway/configmap.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,3 @@ metadata:
1515
{{- include "argo-gateway.labels" . | nindent 4 }}
1616
data:
1717
{{- $mergedConfig | toYaml | nindent 2 }}
18-
{{- if index .Values "argo-cd" "enabled" }}
19-
foo: bar
20-
{{- else }}
21-
baz: qux
22-
{{- end }}

charts/gitops-runtime/templates/argo-gateway/deployment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ spec:
2121
{{- include "argo-gateway.selectorLabels" . | nindent 6 }}
2222
template:
2323
metadata:
24-
{{- with $context.Values.podAnnotations }}
2524
annotations:
25+
checksum/config-argo-gateway: {{ include (print $.Template.BasePath "/argo-gateway/configmap.yaml") . | sha256sum }}
26+
checksum/config-codefresh-cm: {{ include (print $.Template.BasePath "/codefresh-cm.yaml") . | sha256sum }}
27+
{{- with $context.Values.podAnnotations }}
2628
{{- toYaml . | nindent 8 }}
2729
{{- end }}
2830
labels:

charts/gitops-runtime/templates/event-reporters/cluster-event-reporter/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ spec:
2525
{{- include "cluster-event-reporter.selectorLabels" . | nindent 6 }}
2626
template:
2727
metadata:
28-
{{- with $context.Values.podAnnotations }}
2928
annotations:
29+
checksum/config-event-reporter: {{ include (print $.Template.BasePath "/event-reporters/cluster-event-reporter/configmap.yaml") . | sha256sum }}
30+
checksum/config-codefresh-cm: {{ include (print $.Template.BasePath "/codefresh-cm.yaml") . | sha256sum }}
31+
{{- if index .Values "argo-cd" "enabled" }}
32+
checksum/config-argocd: {{ include ("argo-cd.config.params") (index .Subcharts "argo-cd") | sha256sum }}
33+
{{- end }}
34+
{{- with $context.Values.podAnnotations }}
3035
{{- toYaml . | nindent 8 }}
3136
{{- end }}
3237
labels:

charts/gitops-runtime/templates/event-reporters/runtime-event-reporter/deployment.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ spec:
2525
{{- include "runtime-event-reporter.selectorLabels" . | nindent 6 }}
2626
template:
2727
metadata:
28-
{{- with $context.Values.podAnnotations }}
2928
annotations:
29+
checksum/config-event-reporter: {{ include (print $.Template.BasePath "/event-reporters/runtime-event-reporter/configmap.yaml") . | sha256sum }}
30+
checksum/config-codefresh-cm: {{ include (print $.Template.BasePath "/codefresh-cm.yaml") . | sha256sum }}
31+
{{- if index .Values "argo-cd" "enabled" }}
32+
checksum/config-argocd: {{ include ("argo-cd.config.params") (index .Subcharts "argo-cd") | sha256sum }}
33+
{{- end }}
34+
{{- with $context.Values.podAnnotations }}
3035
{{- toYaml . | nindent 8 }}
3136
{{- end }}
3237
labels:

charts/gitops-runtime/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ global:
106106
# name: argocd-token
107107
# key: token
108108
# -- Service name of the ArgoCD server
109-
svc: argo-cd-server
109+
svc: argocd-server
110110
# -- Port of the ArgoCD server
111111
port: 80
112112
# -- Set if Argo CD is running behind reverse proxy under subpath different from /

0 commit comments

Comments
 (0)