Skip to content

Commit

Permalink
Fix finalizer typo and re-create manifests (#631)
Browse files Browse the repository at this point in the history
These changes address issue #630

When trying to create one of the example RayCluster on OpenShift, it will fail with the operator reporting "cannot set blockOwnerDeletion if an ownerReference refers to a resource you can’t set finalizers on:".

As per https://sdk.operatorframework.io/docs/faqs/#after-deploying-my-operator-why-do-i-see-errors-like-is-forbidden-cannot-set-blockownerdeletion-if-an-ownerreference-refers-to-a-resource-you-cant-set-finalizers-on-, we were able to fix the issue by applying the new role.yaml that is created running make manifests after applying the changes in this PR.
  • Loading branch information
AlessandroPomponio authored Oct 13, 2022
1 parent e2a6ae8 commit 389ba00
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions helm-chart/kuberay-operator/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ rules:
- apiGroups:
- ray.io
resources:
- rayclusters/finalizer
- rayclusters/finalizers
verbs:
- update
- apiGroups:
Expand All @@ -154,7 +154,7 @@ rules:
- apiGroups:
- ray.io
resources:
- rayjobs/finalizer
- rayjobs/finalizers
verbs:
- update
- apiGroups:
Expand Down
4 changes: 2 additions & 2 deletions ray-operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ rules:
- apiGroups:
- ray.io
resources:
- rayclusters/finalizer
- rayclusters/finalizers
verbs:
- update
- apiGroups:
Expand All @@ -154,7 +154,7 @@ rules:
- apiGroups:
- ray.io
resources:
- rayjobs/finalizer
- rayjobs/finalizers
verbs:
- update
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type RayClusterReconciler struct {
// Automatically generate RBAC rules to allow the Controller to read and write workloads
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/finalizer,verbs=update
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/finalizers,verbs=update
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
Expand Down
2 changes: 1 addition & 1 deletion ray-operator/controllers/ray/rayjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewRayJobReconciler(mgr manager.Manager) *RayJobReconciler {

// +kubebuilder:rbac:groups=ray.io,resources=rayjobs,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=ray.io,resources=rayjobs/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=ray.io,resources=rayjobs/finalizer,verbs=update
// +kubebuilder:rbac:groups=ray.io,resources=rayjobs/finalizers,verbs=update
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
Expand Down
2 changes: 1 addition & 1 deletion ray-operator/controllers/ray/rayservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewRayServiceReconciler(mgr manager.Manager) *RayServiceReconciler {
// +kubebuilder:rbac:groups=ray.io,resources=rayservices/finalizers,verbs=update
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/finalizer,verbs=update
// +kubebuilder:rbac:groups=ray.io,resources=rayclusters/finalizers,verbs=update
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
Expand Down

0 comments on commit 389ba00

Please sign in to comment.