Fix RBAC permissions for leader election.
It turns out, you must give blanket resource creation permissions
if you want to use leader election, because the "create" verb can
only apply to the entire collection of objects, not a specific one.
@@ -38,7 +38,10 @@ rules:
- apiGroups: [""]
resources: ["endpoints"]
resourceNames: ["metallb-speaker"]
- verbs: ["get", "create", "update"]
+ verbs: ["get", "update"]
+- apiGroups: [""]
+ resources: ["endpoints"]
+ verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
