Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
Comment on lines +7 to +12
Copy link
Member Author

@varshaprasad96 varshaprasad96 Apr 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is equivalent to letting operator-controller watch all the resources in cluster. This was added to rukpak to allow watching of any bundle objects that we may anticipate. Since we are dealing with only registryV1 now, we could restrict this to allow only OLM compatible resources. But going to keeping it the same for now, can handle it later in follow ups.

- apiGroups:
- catalogd.operatorframework.io
resources:
Expand All @@ -19,16 +25,27 @@ rules:
- list
- watch
- apiGroups:
- core.rukpak.io
- ""
resources:
- configmaps
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- bundledeployments
- pods
verbs:
- create
- get
- delete
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods/log
verbs:
- get
- apiGroups:
- kappctrl.k14s.io
resources:
Expand Down
6 changes: 4 additions & 2 deletions internal/controllers/clusterextension_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ type ClusterExtensionReconciler struct {
//+kubebuilder:rbac:groups=olm.operatorframework.io,resources=clusterextensions,verbs=get;list;watch
//+kubebuilder:rbac:groups=olm.operatorframework.io,resources=clusterextensions/status,verbs=update;patch
//+kubebuilder:rbac:groups=olm.operatorframework.io,resources=clusterextensions/finalizers,verbs=update

//+kubebuilder:rbac:groups=core.rukpak.io,resources=bundledeployments,verbs=get;list;watch;create;update;patch
//+kubebuilder:rbac:groups=core,resources=pods,verbs=list;watch;create;delete
//+kubebuilder:rbac:groups=core,resources=configmaps,verbs=list;watch
//+kubebuilder:rbac:groups=core,resources=pods/log,verbs=get
//+kubebuilder:rbac:groups=*,resources=*,verbs=*

//+kubebuilder:rbac:groups=catalogd.operatorframework.io,resources=catalogs,verbs=list;watch
//+kubebuilder:rbac:groups=catalogd.operatorframework.io,resources=catalogmetadata,verbs=list;watch
Expand Down