From 5132b0eb611cacc1dcc76549a01d03ac5229cf84 Mon Sep 17 00:00:00 2001 From: Kevin McDermott Date: Tue, 20 Sep 2022 09:49:20 +0100 Subject: [PATCH] Add additional RBAC. --- config/rbac/role.yaml | 9 +++++++++ controllers/clusterbootstrapconfig_controller.go | 1 + 2 files changed, 10 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ee30576..55c18a4 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -61,3 +61,12 @@ rules: - patch - update - watch +- apiGroups: + - gitops.weave.works + resources: + - gitopsclusters + verbs: + - get + - list + - patch + - watch diff --git a/controllers/clusterbootstrapconfig_controller.go b/controllers/clusterbootstrapconfig_controller.go index a6a58b7..a976880 100644 --- a/controllers/clusterbootstrapconfig_controller.go +++ b/controllers/clusterbootstrapconfig_controller.go @@ -63,6 +63,7 @@ func NewClusterBootstrapConfigReconciler(c client.Client, s *runtime.Scheme) *Cl //+kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete //+kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch +// +kubebuilder:rbac:groups="gitops.weave.works",resources=gitopsclusters,verbs=get;watch;list;patch // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state.