From 6c775571e30d2af73671bd02fed47a554b8ad167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20No=C3=ABl?= Date: Tue, 31 Mar 2020 04:40:41 +0200 Subject: [PATCH] Fix cache service annotations indentation (#77) Also add the same test in front of it as other services Signed-off-by: Victor Noel --- charts/pomerium/Chart.yaml | 2 +- charts/pomerium/templates/cache-service.yaml | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/charts/pomerium/Chart.yaml b/charts/pomerium/Chart.yaml index 5ab00ac1..953c0b6a 100644 --- a/charts/pomerium/Chart.yaml +++ b/charts/pomerium/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: pomerium -version: 7.0.0 +version: 7.0.1 appVersion: 0.6.2 home: http://www.pomerium.io/ icon: https://www.pomerium.io/logo-long.svg diff --git a/charts/pomerium/templates/cache-service.yaml b/charts/pomerium/templates/cache-service.yaml index 093cecd1..09cb6cb9 100644 --- a/charts/pomerium/templates/cache-service.yaml +++ b/charts/pomerium/templates/cache-service.yaml @@ -11,15 +11,17 @@ metadata: {{- if .Values.service.labels }} {{ toYaml .Values.service.labels | indent 4 }} {{- end }} -annotations: -{{- if .Values.cache.service.annotations }} - {{- range $key, $value := .Values.cache.service.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -{{- else if .Values.service.annotations }} - {{- range $key, $value := .Values.service.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} +{{- if or .Values.authenticate.service.annotations .Values.service.annotations }} + annotations: + {{- if .Values.cache.service.annotations }} + {{- range $key, $value := .Values.cache.service.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- else if .Values.service.annotations }} + {{- range $key, $value := .Values.service.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} {{- end }} spec: {{- if .Values.service.cache.headless }}