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