
Uses Values.injector.externalVaultAddr to control the vault address env variable and server yaml rendering. If injector.externalVaultAddr is empty, both the injector and vault are deployed, with the injector using the local vault. If injector.externalVaultAddr is not empty, only the injector is deployed, and it uses the vault at the address specified in injector.externalVaultAddr.
25 lines
884 B
YAML
25 lines
884 B
YAML
{{ template "vault.mode" . }}
|
|
{{- if ne .mode "external" }}
|
|
{{- if and (eq (.Values.global.enabled | toString) "true") (ne .mode "dev") -}}
|
|
{{ if or (ne .Values.server.standalone.config "") (ne .Values.server.ha.config "") -}}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ template "vault.fullname" . }}-config
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
helm.sh/chart: {{ include "vault.chart" . }}
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
data:
|
|
extraconfig-from-values.hcl: |-
|
|
disable_mlock = true
|
|
{{- if eq .mode "standalone" }}
|
|
{{ tpl .Values.server.standalone.config . | nindent 4 | trim }}
|
|
{{- else if eq .mode "ha" }}
|
|
{{ tpl .Values.server.ha.config . | nindent 4 | trim }}
|
|
{{ end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|