{{ 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 }}
roleRef:
  kind: Role
  name: edp-{{ .Values.name }}-{{ .Values.global.edpName }}
  apiGroup: rbac.authorization.k8s.io
subjects:
  - kind: ServiceAccount
    name: "edp-{{ .Values.name }}"
    namespace: {{ .Values.global.edpName }}
{{ end }}