diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 87cbce23..1c1f492b 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -25,6 +25,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: @@ -163,6 +164,7 @@ rules: resources: - manilaapis/finalizers verbs: + - patch - update - apiGroups: - manila.openstack.org @@ -189,6 +191,7 @@ rules: resources: - manilas/finalizers verbs: + - patch - update - apiGroups: - manila.openstack.org @@ -215,6 +218,7 @@ rules: resources: - manilaschedulers/finalizers verbs: + - patch - update - apiGroups: - manila.openstack.org @@ -241,6 +245,7 @@ rules: resources: - manilashares/finalizers verbs: + - patch - update - apiGroups: - manila.openstack.org @@ -267,6 +272,7 @@ rules: resources: - mariadbaccounts/finalizers verbs: + - patch - update - apiGroups: - mariadb.openstack.org @@ -285,6 +291,7 @@ rules: resources: - mariadbdatabases/finalizers verbs: + - patch - update - apiGroups: - memcached.openstack.org @@ -314,6 +321,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: @@ -324,6 +332,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: diff --git a/controllers/manila_controller.go b/controllers/manila_controller.go index 8e596386..c056d659 100644 --- a/controllers/manila_controller.go +++ b/controllers/manila_controller.go @@ -86,23 +86,23 @@ type ManilaReconciler struct { // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilas,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilas/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilas/finalizers,verbs=update +// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilas/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/finalizers,verbs=update +// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/finalizers,verbs=update +// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/finalizers,verbs=update +// +kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;create;update;patch;delete;watch // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;create;update;patch;delete;watch // +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;create;update;patch;delete;watch // +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases/finalizers,verbs=update +// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbdatabases/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts/finalizers,verbs=update +// +kubebuilder:rbac:groups=mariadb.openstack.org,resources=mariadbaccounts/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=memcached.openstack.org,resources=memcacheds,verbs=get;list;watch; // +kubebuilder:rbac:groups=keystone.openstack.org,resources=keystoneapis,verbs=get;list;watch // +kubebuilder:rbac:groups=rabbitmq.openstack.org,resources=transporturls,verbs=get;list;watch;create;update;patch;delete @@ -110,9 +110,9 @@ type ManilaReconciler struct { // +kubebuilder:rbac:groups=batch,resources=cronjobs,verbs=get;list;watch;create;update;patch;delete; // service account, role, rolebinding -// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update -// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update -// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update +// +kubebuilder:rbac:groups="",resources=serviceaccounts,verbs=get;list;watch;create;update;patch +// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=roles,verbs=get;list;watch;create;update;patch +// +kubebuilder:rbac:groups="rbac.authorization.k8s.io",resources=rolebindings,verbs=get;list;watch;create;update;patch // service account permissions that are needed to grant permission to the above // +kubebuilder:rbac:groups="security.openshift.io",resourceNames=anyuid;privileged,resources=securitycontextconstraints,verbs=use // +kubebuilder:rbac:groups="",resources=pods,verbs=create;delete;get;list;patch;update;watch diff --git a/controllers/manilaapi_controller.go b/controllers/manilaapi_controller.go index f3664c2f..e880f6d2 100644 --- a/controllers/manilaapi_controller.go +++ b/controllers/manilaapi_controller.go @@ -82,7 +82,7 @@ var keystoneServices = []map[string]string{ //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/finalizers,verbs=update +//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaapis/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;create;update;patch;delete;watch // +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;create;update;patch;delete;watch diff --git a/controllers/manilascheduler_controller.go b/controllers/manilascheduler_controller.go index 1f48595c..c512687a 100644 --- a/controllers/manilascheduler_controller.go +++ b/controllers/manilascheduler_controller.go @@ -83,7 +83,7 @@ type ManilaSchedulerReconciler struct { //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/finalizers,verbs=update +//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilaschedulers/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list; //+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;create;update;patch;delete;watch diff --git a/controllers/manilashare_controller.go b/controllers/manilashare_controller.go index 75639042..4d81a889 100644 --- a/controllers/manilashare_controller.go +++ b/controllers/manilashare_controller.go @@ -83,7 +83,7 @@ type ManilaShareReconciler struct { //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/finalizers,verbs=update +//+kubebuilder:rbac:groups=manila.openstack.org,resources=manilashares/finalizers,verbs=update;patch // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list; //+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;create;update;patch;delete;watch