{{- if and .Values.rbac.create .Values.rbac.clusterscoped }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ include "goldpinger.fullname" . }}-clusterrole
  labels:
    {{- include "goldpinger.labels" . | nindent 4 }}
rules:
  - apiGroups: [""]
    resources: ["pods"]
    verbs: ["list"]
{{- end }}
