Skip to content

Commit

Permalink
Add watch verb for storageclasses rbac (#258)
Browse files Browse the repository at this point in the history
Fixes these errors: `E0804 17:31:18.410670 1 reflector.go:150]
pkg/mod/k8s.io/client-go@v0.30.2/tools/cache/reflector.go:232: Failed to
watch *v1.StorageClass: unknown (get storageclasses.storage.k8s.io)`
  • Loading branch information
sholdee authored Aug 9, 2024
1 parent 0c4e50d commit bb350c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ rules:
verbs:
- get
- list
- watch
- apiGroups:
- etcd.aenix.io
resources:
Expand Down
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ rules:
verbs:
- get
- list
- watch
2 changes: 1 addition & 1 deletion internal/controller/etcdcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type EtcdClusterReconciler struct {
// +kubebuilder:rbac:groups="apps",resources=statefulsets,verbs=get;create;delete;update;patch;list;watch
// +kubebuilder:rbac:groups="policy",resources=poddisruptionbudgets,verbs=get;create;delete;update;patch;list;watch
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;patch;watch
// +kubebuilder:rbac:groups=storage.k8s.io,resources=storageclasses,verbs=get;list
// +kubebuilder:rbac:groups=storage.k8s.io,resources=storageclasses,verbs=get;list;watch

// Reconcile checks CR and current cluster state and performs actions to transform current state to desired.
func (r *EtcdClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
Expand Down

0 comments on commit bb350c3

Please sign in to comment.