With #157 merged, operator now fails to acquire the lease with the following error:
flatcar-linux-update-operator-78dd8d45ff-z5899 update-operator E0531 13:25:23.785354 1 leaderelection.go:334] error initially creating leader election record: leases.coordination.k8s.io is forbidden: User "system:serviceaccount:flatcar-linux-update-operator:flatcar-linux-update-operator-sa" cannot create resource "leases" in API group "coordination.k8s.io" in the namespace "flatcar-linux-update-operator"
With #157 merged, operator now fails to acquire the lease with the following error:
flatcar-linux-update-operator-78dd8d45ff-z5899 update-operator E0531 13:25:23.785354 1 leaderelection.go:334] error initially creating leader election record: leases.coordination.k8s.io is forbidden: User "system:serviceaccount:flatcar-linux-update-operator:flatcar-linux-update-operator-sa" cannot create resource "leases" in API group "coordination.k8s.io" in the namespace "flatcar-linux-update-operator"
I think we need to add following RBAC rules:
We could actually make ConfigMap rules tighter in similar way while we're at it (#146):
Also while working on #36, we should make sure such cases can be captured.
CC @ateleshev