Skip to content

Commit

Permalink
fix(vector)!: fix conditionals for existingConfigMaps and haproxy.exi…
Browse files Browse the repository at this point in the history
…stingConfigMap (#182)

* fix(vector)!: fix conditionals for haproxy.existingConfigMap

Signed-off-by: Spencer Gilbert <[email protected]>

* fix(vector)!: fix conditionals for existingConfigMaps

Signed-off-by: Spencer Gilbert <[email protected]>
  • Loading branch information
spencergilbert authored Mar 23, 2022
1 parent 782a50a commit 87ca537
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.existingConfig }}
{{- if not .Values.existingConfigMaps }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/haproxy/configmap.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/haproxy/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/haproxy/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 87ca537

Please sign in to comment.