apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: cert-manager-gandi-webhook-secret-reader
  namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
  - ""
  resources:
  - secrets
  verbs:
  - get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: cert-manager-gandi-webhook-secret-reader
  namespace: {{ .Release.Namespace }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cert-manager-gandi-webhook-secret-reader
subjects:
- kind: ServiceAccount
  name: {{ .Values.certManager.gandiWebhookSecretReader }}
  namespace: {{ .Values.certManager.namespace }}
