Skip to content

Commit

Permalink
fix(chart): Update daemonset and deployment to not include annotation…
Browse files Browse the repository at this point in the history
…s key unless populated (#45)
  • Loading branch information
JossWhittle authored Jan 3, 2024
1 parent 397d746 commit 575468e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions charts/canary/templates/controller/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ metadata:
{{- range $key, $value := .Values.controller.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.controller.annotations }}
annotations:
{{- range $key, $value := .Values.controller.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}

spec:

Expand Down Expand Up @@ -45,14 +47,11 @@ spec:
{{- range $key, $value := .Values.controller.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.controller.annotations .Values.controller.podAnnotations }}
{{- if .Values.controller.podAnnotations }}
annotations:
{{- range $key, $value := .Values.controller.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.controller.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}

spec:
Expand Down
7 changes: 3 additions & 4 deletions charts/canary/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ metadata:
{{- range $key, $value := .Values.controller.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.controller.annotations }}
annotations:
{{- range $key, $value := .Values.controller.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}

spec:
replicas: {{ .Values.controller.deployment.replicas }}
Expand All @@ -39,14 +41,11 @@ spec:
{{- range $key, $value := .Values.controller.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.controller.annotations .Values.controller.podAnnotations }}
{{- if .Values.controller.podAnnotations }}
annotations:
{{- range $key, $value := .Values.controller.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.controller.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}

spec:
Expand Down

0 comments on commit 575468e

Please sign in to comment.