{{- $configmap := (lookup "v1" "ConfigMap" .Release.Namespace .Values.officerConfigMapName) -}}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ .Values.officerConfigMapName }}
data:
  officer-roles.yml: |-
  {{- if $configmap }}
    {{- index $configmap "data" "officer-roles.yml" | nindent 4 }}
  {{- else }}
    roles:
      officer
  {{- end -}}