{{- if .Values.etcdOperator.envVars }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "etcd-operator.labels" . }}-env
  labels:
    {{- include "etcd-operator.labels" . | nindent 4 }}
data:
  {{- range $k, $v := .Values.etcdOperator.envVars }}
    {{- if typeOf $v | eq "string" }}
      {{- print (tpl $k $) ": " (tpl $v $ | quote) | nindent 2 }}
    {{- else }}
      {{- print (tpl $k $) ": " ($v | quote) | nindent 2 }}
    {{- end }}
  {{- end }}
{{- end }}
