apiVersion: v1 kind: Secret metadata: name: {{ include "sapl.fullname" . }}-secretkey labels: {{- include "sapl.labels" . | nindent 4 }} type: Opaque data: {{- if .Release.IsUpgrade }} secret.key: {{ index (lookup "v1" "Secret" .Release.Namespace (printf "%s-secretkey" (include "sapl.fullname" .))).data "secret.key" }} {{ else }} # install operation secret.key: {{ randAscii 50 | b64enc }} {{ end }}