apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: system-auth-delegator
  namespace: {{ .Release.Namespace | quote }}
  {{- $annotations := include "common.annotations" (dict "context" .) }}
  {{- with $annotations }}
  annotations: {{- . -}}
  {{- end }}
  labels:
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: system:auth-delegator
subjects:
- kind: ServiceAccount
  name: 'metrics-operator'
  namespace: '{{ .Release.Namespace }}'