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