Skip to content

Commit

Permalink
sync up: add patch permissions (#525)
Browse files Browse the repository at this point in the history
* sync up: add patch permissions

Signed-off-by: Leo Christy Jesuraj <[email protected]>

* Update sample automatically

Signed-off-by: Leo Christy Jesuraj <[email protected]>

---------

Signed-off-by: Leo Christy Jesuraj <[email protected]>
  • Loading branch information
leochr authored Apr 26, 2023
1 parent 20effb5 commit c660e81
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ metadata:
categories: Application Runtime
certified: "true"
containerImage: icr.io/appcafe/runtime-component-operator:daily
createdAt: "2023-04-26T16:16:09Z"
createdAt: "2023-04-26T17:30:36Z"
description: Deploys any runtime component with dynamic and auto-tuning configuration
olm.skipRange: '>=0.8.0 <1.2.0'
operators.openshift.io/infrastructure-features: '["disconnected"]'
Expand Down Expand Up @@ -1126,6 +1126,7 @@ spec:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -1171,6 +1172,7 @@ spec:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -1184,6 +1186,7 @@ spec:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
3 changes: 3 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -117,6 +118,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -130,6 +132,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion controllers/runtimecomponent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type RuntimeComponentReconciler struct {
}

// +kubebuilder:rbac:groups=security.openshift.io,resources=securitycontextconstraints,resourceNames=restricted,verbs=use,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=rc.app.stacks,resources=runtimecomponents;runtimecomponents/status;runtimecomponents/finalizers,verbs=get;list;watch;create;update;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=rc.app.stacks,resources=runtimecomponents;runtimecomponents/status;runtimecomponents/finalizers,verbs=get;list;watch;create;update;patch;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=apps,resources=deployments;statefulsets,verbs=get;list;watch;create;update;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=apps,resources=deployments/finalizers;statefulsets,verbs=update,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=core,resources=services;secrets;serviceaccounts;configmaps,verbs=get;list;watch;create;update;delete,namespace=runtime-component-operator
Expand Down
4 changes: 2 additions & 2 deletions controllers/runtimeoperation_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ type RuntimeOperationReconciler struct {
RestConfig *rest.Config
}

// +kubebuilder:rbac:groups=rc.app.stacks,resources=runtimeoperations;runtimeoperations/status;runtimeoperations/finalizers,verbs=get;list;watch;create;update;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=core,resources=pods;pods/exec,verbs=get;list;watch;create;update;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=rc.app.stacks,resources=runtimeoperations;runtimeoperations/status;runtimeoperations/finalizers,verbs=get;list;watch;create;update;patch;delete,namespace=runtime-component-operator
// +kubebuilder:rbac:groups=core,resources=pods;pods/exec,verbs=get;list;watch;create;update;patch;delete,namespace=runtime-component-operator

func (r *RuntimeOperationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
reqLogger := r.Log.WithValues("Request.Namespace", req.Namespace, "Request.Name", req.Name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -177,6 +178,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -190,6 +192,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -166,6 +167,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -179,6 +181,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down Expand Up @@ -119,6 +120,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand All @@ -132,6 +134,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
1 change: 1 addition & 0 deletions scripts/update-sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ echo "sha is $SHA"

files="
config/samples/rc.app.stacks_v1_runtimecomponent.yaml
config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml
config/manager/manager.yaml
internal/deploy/kustomize/daily/base/runtime-component-operator.yaml
"
Expand Down

0 comments on commit c660e81

Please sign in to comment.