Skip to content

Commit

Permalink
fix extraconfig-from-values.hcl condition mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-weidmann authored Oct 15, 2024
1 parent 3ab634e commit cdd1eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ defined a custom configuration. Additionally iterates over any
extra volumes the user may have specified (such as a secret with TLS).
*/}}
{{- define "vault.volumes" -}}
{{- if and (ne .mode "dev") (or (.Values.server.standalone.config) (.Values.server.ha.config) (.Values.server.ha.raft.config)) }}
{{- if and (ne .mode "dev") (ne .mode "external") (.serverEnabled) (or (.Values.server.standalone.config) (.Values.server.ha.config) (.Values.server.ha.raft.config)) }}
- name: config
configMap:
name: {{ template "vault.fullname" . }}-config
Expand Down Expand Up @@ -215,7 +215,7 @@ file with IP addresses to make the out of box experience easier
for users looking to use this chart with Consul Helm.
*/}}
{{- define "vault.args" -}}
{{ if or (eq .mode "standalone") (eq .mode "ha") }}
{{ if and (ne .mode "dev") (ne .mode "external") (.serverEnabled) (or (.Values.server.standalone.config) (.Values.server.ha.config) (.Values.server.ha.raft.config)) }}
- |
cp /vault/config/extraconfig-from-values.hcl /tmp/storageconfig.hcl;
[ -n "${HOST_IP}" ] && sed -Ei "s|HOST_IP|${HOST_IP?}|g" /tmp/storageconfig.hcl;
Expand Down
8 changes: 1 addition & 7 deletions templates/server-config-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ SPDX-License-Identifier: MPL-2.0
*/}}

{{ template "vault.mode" . }}
{{- if ne .mode "external" }}
{{- if .serverEnabled -}}
{{- if ne .mode "dev" -}}
{{ if or (.Values.server.standalone.config) (.Values.server.ha.config) -}}
{{- if and (ne .mode "dev") (ne .mode "external") (.serverEnabled) (or (.Values.server.standalone.config) (.Values.server.ha.config) (.Values.server.ha.raft.config)) }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -26,6 +23,3 @@ data:
extraconfig-from-values.hcl: |-
{{ template "vault.config" . }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit cdd1eaa

Please sign in to comment.