Skip to content

Commit

Permalink
Adds configMap RBAC (#15)
Browse files Browse the repository at this point in the history
* Adds RBAC to read the azure cluster details configmap

- Gives permissions for controller SA to read the `extension-manager-configmap`
- Need just need to read a specific one in kube-system

* Scoping RBAC down to namespaces doesn't work great

- Gets stripped out at some point in the tooling
  • Loading branch information
foot authored Oct 26, 2023
1 parent 0ba7ecd commit 2e4ddbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type AutomatedClusterDiscoveryReconciler struct {
//+kubebuilder:rbac:groups=clusters.weave.works,resources=automatedclusterdiscoveries/finalizers,verbs=update
//+kubebuilder:rbac:groups=gitops.weave.works,resources=gitopsclusters,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down

0 comments on commit 2e4ddbd

Please sign in to comment.