From 14cf486696ad78c20f56f083706bc8a10d6fefde Mon Sep 17 00:00:00 2001 From: r0zbot Date: Mon, 11 Sep 2023 20:30:54 -0300 Subject: [PATCH] Fix cluster role binding --- config/rbac/role.yaml | 8 ++++++++ controllers/mongodbcluster_controller.go | 1 + 2 files changed, 9 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index eabeb65..9222e39 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,6 +5,14 @@ metadata: creationTimestamp: null name: manager-role rules: +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch - apiGroups: - "" - apps diff --git a/controllers/mongodbcluster_controller.go b/controllers/mongodbcluster_controller.go index 10661e9..a1567d2 100644 --- a/controllers/mongodbcluster_controller.go +++ b/controllers/mongodbcluster_controller.go @@ -59,6 +59,7 @@ type MongoDBClusterReconciler struct { //+kubebuilder:rbac:groups=airlock.cloud.rocket.chat,resources=mongodbclusters/status,verbs=get;update;patch //+kubebuilder:rbac:groups=airlock.cloud.rocket.chat,resources=mongodbclusters/finalizers,verbs=update //+kubebuilder:rbac:groups="";apps;networking.k8s.io,resources=secrets,verbs=get;list;watch;create;update;patch;delete +//+kubebuilder:rbac:groups="",resources=nodes,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.