rancher-charts/charts/neuvector/102.0.8+up2.7.3/templates/controller-secret.yaml

21 lines
815 B
YAML

{{- if .Values.controller.enabled -}}
{{- if .Values.autoGenerateCert }}
{{- $cn := "neuvector" }}
{{- $cert := genSelfSignedCert $cn nil (list $cn) (.Values.defaultValidityPeriod | int) -}}
apiVersion: v1
kind: Secret
metadata:
name: neuvector-controller-secret
namespace: {{ .Release.Namespace }}
labels:
chart: {{ template "neuvector.chart" . }}
release: {{ .Release.Name }}
heritage: Helm
type: Opaque
data:
ssl-cert.key: {{ include "neuvector.secrets.lookup" (dict "namespace" .Release.Namespace "secret" "neuvector-controller-secret" "key" "ssl-cert.key" "defaultValue" $cert.Key) }}
ssl-cert.pem: {{ include "neuvector.secrets.lookup" (dict "namespace" .Release.Namespace "secret" "neuvector-controller-secret" "key" "ssl-cert.pem" "defaultValue" $cert.Cert) }}
---
{{- end}}
{{- end}}