Skip to content

Commit 91e4fcb

Browse files
Jorge MarinSameer Naik
authored andcommitted
Fix annotations in svc.yaml (helm#2905)
* Fix annotations in svc.yaml If `.Values.service.annotations` is empty (which is the default configuration), the field `annotations` will be blank, producing a failed deployment. This patch only adds service annotations if they exist. * Update Chart.yaml
1 parent c5ce3fe commit 91e4fcb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stable/redis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: redis
2-
version: 1.1.0
2+
version: 1.1.1
33
appVersion: 4.0.2
44
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
55
keywords:

stable/redis/templates/svc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ metadata:
88
release: "{{ .Release.Name }}"
99
heritage: "{{ .Release.Service }}"
1010
annotations:
11-
{{- range $key, $value := .Values.service.annotations }}
12-
{{ $key }}: {{ $value | quote }}
13-
{{- end }}
11+
{{- if .Values.service.annotations }}
12+
{{ toYaml .Values.service.annotations | indent 4 }}
13+
{{- end }}
1414
{{- if .Values.metrics.enabled }}
1515
{{ toYaml .Values.metrics.annotations | indent 4 }}
1616
{{- end }}

0 commit comments

Comments
 (0)