Skip to content

Commit

Permalink
Leader election need lease permission (ray-project#169)
Browse files Browse the repository at this point in the history
Co-authored-by: wuhua.ck <wuhua.ck@alibaba-inc.com>
  • Loading branch information
chenk008 and wuhua.ck committed Mar 4, 2022
1 parent c4d07aa commit 2a6d7af
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ray-operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,12 @@ rules:
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- get
- list
- update
1 change: 1 addition & 0 deletions ray-operator/controllers/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ type RayClusterReconciler struct {
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=core,resources=services/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update
// Reconcile used to bridge the desired state with the current state
func (r *RayClusterReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error) {
_ = r.Log.WithValues("raycluster", request.NamespacedName)
Expand Down

0 comments on commit 2a6d7af

Please sign in to comment.