Use with statement for readability
Signed-off-by: Marco Franssen <[email protected]> Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
{{- if eq (.Values.server.config.upstreamAuthority.disk.enabled | toString) "true"}}
|
||||
{{- $root := . }}
|
||||
{{- with .Values.server.config.upstreamAuthority.disk }}
|
||||
{{- if eq (.enabled | toString) "true" }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "spire.fullname" . }}-upstream-ca
|
||||
namespace: {{ .Release.Namespace }}
|
||||
name: {{ include "spire.fullname" $root }}-upstream-ca
|
||||
namespace: {{ $root.Release.Namespace }}
|
||||
labels:
|
||||
{{- include "spire.server.labels" . | nindent 4 }}
|
||||
{{- include "spire.server.labels" $root | nindent 4 }}
|
||||
data:
|
||||
tls.crt: {{ .Values.server.config.upstreamAuthority.disk.certificate | toYaml | indent 2 }}
|
||||
tls.key: {{ .Values.server.config.upstreamAuthority.disk.key | toYaml | indent 2 }}
|
||||
{{- if ne .Values.server.config.upstreamAuthority.disk.bundle ""}}
|
||||
bundle.crt: {{ .Values.server.config.upstreamAuthority.disk.bundle | toYaml | indent 2 }}
|
||||
tls.crt: {{ .certificate | toYaml | indent 2 }}
|
||||
tls.key: {{ .key | toYaml | indent 2 }}
|
||||
{{- if ne .bundle ""}}
|
||||
bundle.crt: {{ .bundle | toYaml | indent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user