diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index f76a4e3d6fc..bfdd888fc8a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -46,6 +46,15 @@ rules: - apiGroups: - exp.cluster.x-k8s.io resources: + - machinepools + - machinepools/status + verbs: + - get + - list + - watch +- apiGroups: + - exp.infrastructure.cluster.x-k8s.io + resources: - azuremachinepools verbs: - create @@ -56,22 +65,13 @@ rules: - update - watch - apiGroups: - - exp.cluster.x-k8s.io + - exp.infrastructure.cluster.x-k8s.io resources: - azuremachinepools/status verbs: - get - patch - update -- apiGroups: - - exp.cluster.x-k8s.io - resources: - - machinepools/status - - machinespools - verbs: - - get - - list - - watch - apiGroups: - infrastructure.cluster.x-k8s.io resources: diff --git a/exp/controllers/azuremachinepool_controller.go b/exp/controllers/azuremachinepool_controller.go index 5417a94456a..a6129afac62 100644 --- a/exp/controllers/azuremachinepool_controller.go +++ b/exp/controllers/azuremachinepool_controller.go @@ -80,7 +80,7 @@ type ( // +kubebuilder:rbac:groups=exp.infrastructure.cluster.x-k8s.io,resources=azuremachinepools,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=exp.infrastructure.cluster.x-k8s.io,resources=azuremachinepools/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=exp.cluster.x-k8s.io,resources=machinespools;machinepools/status,verbs=get;list;watch +// +kubebuilder:rbac:groups=exp.cluster.x-k8s.io,resources=machinepools;machinepools/status,verbs=get;list;watch // +kubebuilder:rbac:groups="",resources=events,verbs=get;list;watch;create;update;patch // +kubebuilder:rbac:groups="",resources=secrets;,verbs=get;list;watch