{{- if eq .Values.tenancyEngine "none" -}}
{{- if eq .Values.global.platform "kubernetes" -}}
{{- if .Values.manageNamespace -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    {{- include "cd-pipeline-operator.labels" . | nindent 4 }}
  name: edp-{{ .Values.name }}-{{ .Release.Namespace }}
rules:
- apiGroups:
    - ""
  resources:
    - namespaces
  verbs:
    - get
    - list
    - create
    - delete
{{- end -}}
{{- end -}}
{{- end -}}
