Files
helm-charts-hardened/charts/spire/charts/spire-server/templates/upstream-ca-secret.yaml
T
Drew Wells 8748933548 Update upstream-ca-secret.yaml (#341)
Fix an issue with nested context being used for namespace

Fixes this issue:
```
Error: UPGRADE FAILED: template: spire/charts/spire-server/templates/upstream-ca-secret.yaml:8:16: executing "spire/charts/spire-server/templates/upstream-ca-secret.yaml" at <include "spire-server.names
pace" .>: error calling include: template: spire/charts/spire-server/templates/_helpers.tpl:30:16: executing "spire-server.namespace" at <.Values.namespaceOverride>: nil pointer evaluating interface {}.
namespaceOverride
helm.go:84: [debug] template: spire/charts/spire-server/templates/upstream-ca-secret.yaml:8:16: executing "spire/charts/spire-server/templates/upstream-ca-secret.yaml" at <include "spire-server.namespac
e" .>: error calling include: template: spire/charts/spire-server/templates/_helpers.tpl:30:16: executing "spire-server.namespace" at <.Values.namespaceOverride>: nil pointer evaluating interface {}.nam
espaceOverride
```

Signed-off-by: Drew Wells <[email protected]>
2023-06-12 11:25:14 -07:00

21 lines
589 B
YAML

{{- $root := . }}
{{- with .Values.upstreamAuthority.disk }}
{{- if and (eq (.enabled | toString) "true") (eq (.secret.create | toString) "true") }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "spire-server.upstream-ca-secret" $root }}
namespace: {{ include "spire-server.namespace" $root }}
labels:
{{- include "spire-server.labels" $root | nindent 4 }}
data:
{{- with .secret.data }}
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
{{- if ne .bundle ""}}
bundle.crt: {{ .bundle | b64enc }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}