{{- if not .Values.existingSecret }} apiVersion: v1 kind: Secret metadata: name: {{ include "k8s-watcher.name" . }}-secret {{- if hasKey .Values "namespace" }} namespace: {{ .Values.namespace }} {{- end }} type: Opaque data: apiKey: {{ .Values.apiKey | required "apiKey is a required value!" | b64enc }} {{- end }}