{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: {{ include "cozy-proxy.fullname" . }}
  labels:
    {{- include "cozy-proxy.labels" . | nindent 4 }}
rules:
  - apiGroups: [""]
    resources: ["services", "endpoints"]
    verbs: ["get", "list", "watch"]
{{- end }}
