apiVersion: v1 kind: Secret metadata: name: secret type: Opaque data: password: {{ .Values.password }} {{- if .Values.api_key }} api_key: {{ .Values.api_key }} {{- end }}