From 978e4a2f9088cb02ead4949ce78e08610c502d78 Mon Sep 17 00:00:00 2001 From: AlexMapley Date: Wed, 15 Nov 2023 13:43:11 -0500 Subject: [PATCH] fix linter complaints, add empty ci values test --- charts/posit-chronicle/ci/empty-values.yaml | 0 charts/posit-chronicle/templates/_helpers.tpl | 2 +- charts/posit-chronicle/templates/serviceaccount.yaml | 3 +-- charts/posit-chronicle/templates/stateful-set.yaml | 4 ++-- charts/posit-chronicle/templates/svc.yaml | 5 +++-- 5 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 charts/posit-chronicle/ci/empty-values.yaml diff --git a/charts/posit-chronicle/ci/empty-values.yaml b/charts/posit-chronicle/ci/empty-values.yaml new file mode 100644 index 00000000..e69de29b diff --git a/charts/posit-chronicle/templates/_helpers.tpl b/charts/posit-chronicle/templates/_helpers.tpl index e50ef318..4616a9f9 100644 --- a/charts/posit-chronicle/templates/_helpers.tpl +++ b/charts/posit-chronicle/templates/_helpers.tpl @@ -61,7 +61,7 @@ Generate selector labels for various resources app: chronicle-server {{- end -}} -{{- define "posit-chronicle.serviceaccount.selectorLabels" -}} +{{- define "posit-chronicle.service.selectorLabels" -}} {{- range $key,$value := $.Values.serviceaccount.selectorLabels -}} {{ $key }}: {{ $value | quote }} {{ end }} diff --git a/charts/posit-chronicle/templates/serviceaccount.yaml b/charts/posit-chronicle/templates/serviceaccount.yaml index b65409c2..1f766675 100644 --- a/charts/posit-chronicle/templates/serviceaccount.yaml +++ b/charts/posit-chronicle/templates/serviceaccount.yaml @@ -1,5 +1,5 @@ --- -{{- if $.Values.serviceaccount.enabled -}} +{{- if .Values.serviceaccount.enabled -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -9,4 +9,3 @@ metadata: annotations: {{ include "posit-chronicle.serviceaccount.annotations" . | indent 4 }} {{- end -}} ---- diff --git a/charts/posit-chronicle/templates/stateful-set.yaml b/charts/posit-chronicle/templates/stateful-set.yaml index f9d6dbb1..48060b4f 100644 --- a/charts/posit-chronicle/templates/stateful-set.yaml +++ b/charts/posit-chronicle/templates/stateful-set.yaml @@ -9,12 +9,12 @@ spec: replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include "posit-chronicle.selectorLabels" . | nindent 6 }} + {{- include "posit-chronicle.pod.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "posit-chronicle.pod.labels" . | nindent 8 }} - {{- include "posit-chronicle.selectorLabels" . | indent 8 }} + {{- include "posit-chronicle.pod.selectorLabels" . | indent 8 }} annotations: {{- include "posit-chronicle.pod.annotations" . | indent 8 }} spec: diff --git a/charts/posit-chronicle/templates/svc.yaml b/charts/posit-chronicle/templates/svc.yaml index 5910e362..2f1b0db0 100644 --- a/charts/posit-chronicle/templates/svc.yaml +++ b/charts/posit-chronicle/templates/svc.yaml @@ -4,12 +4,13 @@ kind: Service metadata: name: chronicle-server labels: - {{ include "posit-chronicle.service.labels" . | indent 4 }} + {{- include "posit-chronicle.service.labels" . | nindent 4 }} + {{- include "posit-chronicle.service.selectorLabels" . | indent 4 }} annotations: {{ include "posit-chronicle.service.annotations" . | indent 4 }} spec: selector: - {{- include "posit-chronicle.selectorLabels" . | nindent 5 }} + {{- include "posit-chronicle.service.selectorLabels" . | indent 4 }} ports: - port: {{ .Values.service.rest.port }} targetPort: {{ .Values.service.rest.targetPort }}