{{- if eq .Values.global.platform "openshift" -}}
apiVersion: authorization.openshift.io/v1
kind: RoleBinding
metadata:
  labels:
    {{- include "jenkins-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-{{ .Values.global.edpName }}-admin
roleRef:
  name: admin
subjects:
  - kind: ServiceAccount
    name: edp-{{ .Values.name }}
    namespace: {{ .Values.global.edpName }}
userNames:
  - system:serviceaccount:{{ .Values.global.edpName }}:edp-{{ .Values.name }}
groupNames: []
{{- end -}}