{{- if .Values.iap.enabled }} kind: Secret apiVersion: v1 metadata: name: {{ template "cockroachdb.fullname" . }}.iap namespace: {{ .Release.Namespace | quote }} labels: helm.sh/chart: {{ template "cockroachdb.chart" . }} app.kubernetes.io/name: {{ template "cockroachdb.name" . }} app.kubernetes.io/instance: {{ .Release.Name | quote }} app.kubernetes.io/managed-by: {{ .Release.Service | quote }} {{- with .Values.labels }} {{- toYaml . | nindent 4 }} {{- end }} type: Opaque data: {{- if eq "" .Values.iap.clientId }} {{ fail "iap.clientID can't be empty if iap.enabled is set to true" }} {{- end }} client_id: {{ .Values.iap.clientId | b64enc }} {{- if eq "" .Values.iap.clientSecret }} {{ fail "iap.clientSecret can't be empty if iap.enabled is set to true" }} {{- end }} client_secret: {{ .Values.iap.clientSecret | b64enc }} {{- end }}