{{- if eq .Values.global.platform "openshift"  -}}
  {{- $name := printf "edp-%s-admin" .Release.Namespace -}}
apiVersion: authorization.openshift.io/v1
kind: RoleBinding
metadata:
  name: {{$name}}
  labels:
    {{- include "edp-install.labels" . | nindent 4 }}
roleRef:
  name: admin
subjects:
- kind: User
  name: admin
- kind: ServiceAccount
  name: edp
  namespace: {{ .Release.Namespace }}
userNames:
- admin
- system:serviceaccount:{{ .Release.Namespace }}:edp
{{- end -}}
