diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 7eeff98..4077371 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -9,7 +9,7 @@ rules: - apiGroups: - "" resources: - - serviceaccount + - serviceaccounts verbs: - create - delete @@ -79,7 +79,7 @@ rules: - apiGroups: - rbac.authorization.k8s.io resources: - - rolebinding + - rolebindings verbs: - create - delete diff --git a/controllers/controller.go b/controllers/controller.go index 18467d2..f627014 100644 --- a/controllers/controller.go +++ b/controllers/controller.go @@ -29,8 +29,8 @@ type StatefulSetReconciler struct { //+kubebuilder:rbac:groups=core,resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=batch,resources=jobs/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=rolebinding,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups="",resources=serviceaccount,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=rolebindings,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch;delete // Reconcile is the main work loop, reacting to changes in statefulsets and initiating resizing of StatefulSets. func (r *StatefulSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {