diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 30bdcd96..1a810922 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -25,6 +25,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: @@ -92,6 +93,7 @@ rules: resources: - horizons/finalizers verbs: + - patch - update - apiGroups: - horizon.openstack.org @@ -133,6 +135,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: @@ -143,6 +146,7 @@ rules: - create - get - list + - patch - update - watch - apiGroups: diff --git a/controllers/horizon_controller.go b/controllers/horizon_controller.go index e000c55a..1d8bbf6e 100644 --- a/controllers/horizon_controller.go +++ b/controllers/horizon_controller.go @@ -90,7 +90,7 @@ type HorizonReconciler struct { //+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/finalizers,verbs=update +//+kubebuilder:rbac:groups=horizon.openstack.org,resources=horizons/finalizers,verbs=update;patch //+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete; //+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete; //+kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete; @@ -100,9 +100,9 @@ type HorizonReconciler struct { //+kubebuilder:rbac:groups=memcached.openstack.org,resources=memcacheds,verbs=get;list;watch; // 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,resources=securitycontextconstraints,verbs=use // +kubebuilder:rbac:groups="",resources=pods,verbs=create;delete;get;list;patch;update;watch