{{- if eq .Values.global.platform "openshift" -}}
{{- if .Values.manageNamespace -}}
apiVersion: authorization.openshift.io/v1
kind: ClusterRoleBinding
metadata:
  labels:
    {{- include "cd-pipeline-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-{{ .Release.Namespace }}-self-provisioner
roleRef:
  name: self-provisioner
subjects:
  - kind: ServiceAccount
    name: edp-{{ .Values.name }}
    namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end -}}
