{{- if eq .Values.global.platform "kubernetes" -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    {{- include "jenkins-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-{{ .Values.global.edpName }}-admin
roleRef:
  name: admin
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
subjects:
  - kind: ServiceAccount
    name: edp-{{ .Values.name }}
    namespace: {{ .Values.global.edpName }}
{{- end -}}