apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  labels:
    {{- include "endpoint-copier-operator.labels" . | nindent 4 }}
  name: {{ include "endpoint-copier-operator.fullname" . }}-leader-election
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: {{ include "endpoint-copier-operator.fullname" . }}-leader-election
subjects:
- kind: ServiceAccount
  name: {{ include "endpoint-copier-operator.fullname" . }}
  namespace: {{ .Release.Namespace }}
