From 87ca537b54f9956c434ddbbd3cfcc9942d7e9c07 Mon Sep 17 00:00:00 2001 From: Spencer Gilbert Date: Wed, 23 Mar 2022 16:05:32 -0400 Subject: [PATCH] fix(vector)!: fix conditionals for existingConfigMaps and haproxy.existingConfigMap (#182) * fix(vector)!: fix conditionals for haproxy.existingConfigMap Signed-off-by: Spencer Gilbert * fix(vector)!: fix conditionals for existingConfigMaps Signed-off-by: Spencer Gilbert --- charts/vector/templates/_pod.tpl | 6 +++--- charts/vector/templates/configmap.yaml | 2 +- charts/vector/templates/haproxy/configmap.yaml | 2 +- charts/vector/templates/haproxy/deployment.yaml | 2 +- charts/vector/templates/haproxy/service.yaml | 2 +- charts/vector/templates/service-headless.yaml | 2 +- charts/vector/templates/service.yaml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/vector/templates/_pod.tpl b/charts/vector/templates/_pod.tpl index d2734cc..59a94d1 100644 --- a/charts/vector/templates/_pod.tpl +++ b/charts/vector/templates/_pod.tpl @@ -64,7 +64,7 @@ containers: value: "/host/sys" {{- end }} ports: -{{- if or .Values.containerPorts .Values.existingConfig }} +{{- if or .Values.containerPorts .Values.existingConfigMaps }} {{- toYaml .Values.containerPorts | nindent 6 }} {{- else if .Values.customConfig }} {{- include "vector.containerPorts" . | indent 6 }} @@ -112,8 +112,8 @@ containers: {{- end }} volumeMounts: - name: data - {{- if .Values.existingConfig }} - mountPath: "{{ if .Values.dataDir }}{{ .Values.dataDir }}{{ else }}{{ fail "Specify `dataDir` if you're using `existingConfig`" }}{{ end }}" + {{- if .Values.existingConfigMaps }} + mountPath: "{{ if .Values.dataDir }}{{ .Values.dataDir }}{{ else }}{{ fail "Specify `dataDir` if you're using `existingConfigMaps`" }}{{ end }}" {{- else }} mountPath: "{{ .Values.customConfig.data_dir | default "/vector-data-dir" }}" {{- end }} diff --git a/charts/vector/templates/configmap.yaml b/charts/vector/templates/configmap.yaml index f0aa51d..a4cebbe 100644 --- a/charts/vector/templates/configmap.yaml +++ b/charts/vector/templates/configmap.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.existingConfig }} +{{- if not .Values.existingConfigMaps }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/vector/templates/haproxy/configmap.yaml b/charts/vector/templates/haproxy/configmap.yaml index 2c86aa0..49d279a 100644 --- a/charts/vector/templates/haproxy/configmap.yaml +++ b/charts/vector/templates/haproxy/configmap.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.haproxy.enabled (not .Values.existingConfig) }} +{{- if and .Values.haproxy.enabled (not .Values.haproxy.existingConfigMap) }} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/vector/templates/haproxy/deployment.yaml b/charts/vector/templates/haproxy/deployment.yaml index ce49ff1..337193f 100644 --- a/charts/vector/templates/haproxy/deployment.yaml +++ b/charts/vector/templates/haproxy/deployment.yaml @@ -55,7 +55,7 @@ spec: - -f - /usr/local/etc/haproxy/haproxy.cfg ports: - {{- if or .Values.haproxy.containerPorts .Values.haproxy.existingConfig }} + {{- if or .Values.haproxy.containerPorts .Values.haproxy.existingConfigMap }} {{- toYaml .Values.haproxy.containerPorts | nindent 12 }} {{- else if .Values.customConfig }} {{- include "vector.containerPorts" . | indent 12 }} diff --git a/charts/vector/templates/haproxy/service.yaml b/charts/vector/templates/haproxy/service.yaml index 519450b..4ca055c 100644 --- a/charts/vector/templates/haproxy/service.yaml +++ b/charts/vector/templates/haproxy/service.yaml @@ -11,7 +11,7 @@ metadata: {{- end }} spec: ports: -{{- if or .Values.haproxy.service.ports .Values.haproxy.existingConfig }} +{{- if or .Values.haproxy.service.ports .Values.haproxy.existingConfigMap }} {{- toYaml .Values.haproxy.service.ports | nindent 4 }} {{- else if .Values.customConfig }} {{- include "vector.ports" . | indent 4 }} diff --git a/charts/vector/templates/service-headless.yaml b/charts/vector/templates/service-headless.yaml index 8b7e5e9..e4b1658 100644 --- a/charts/vector/templates/service-headless.yaml +++ b/charts/vector/templates/service-headless.yaml @@ -12,7 +12,7 @@ metadata: spec: clusterIP: None ports: -{{- if or .Values.service.ports .Values.existingConfig }} +{{- if or .Values.service.ports .Values.existingConfigMaps }} {{- toYaml .Values.service.ports | nindent 4 }} {{- else if .Values.customConfig }} {{- include "vector.ports" . | indent 4 }} diff --git a/charts/vector/templates/service.yaml b/charts/vector/templates/service.yaml index e80911e..eb64613 100644 --- a/charts/vector/templates/service.yaml +++ b/charts/vector/templates/service.yaml @@ -11,7 +11,7 @@ metadata: {{- end }} spec: ports: -{{- if or .Values.service.ports .Values.existingConfig }} +{{- if or .Values.service.ports .Values.existingConfigMaps }} {{- toYaml .Values.service.ports | nindent 4 }} {{- else if .Values.customConfig }} {{- include "vector.ports" . | indent 4 }}