{{- $root := . }}
{{- if .Values.global.gerrit.administrators -}}
{{- range .Values.global.gerrit.administrators }}
---
apiVersion: v2.edp.epam.com/v1
kind: GerritGroupMember
metadata:
  name: {{ lower (split "@" ( . | replace "\"" "" | replace "_" "-" | replace ":" "-" ))._0 }}-admin
  labels:
  {{- include "gerrit-operator.metaLabels" $root | nindent 4 }}
spec:
  accountId: {{ . }}
  groupId: administrators
{{- end }}
{{- end }}
