{{- if .Values.config.configFile }}
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: {{ template "oauth2-proxy.name" . }}
    chart: {{ template "oauth2-proxy.chart" . }}
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
  name: {{ template "oauth2-proxy.fullname" . }}
data:
  oauth2_proxy.cfg: {{ .Values.config.configFile | quote }}
{{- end }}
