From 13a88d5630f9b85abb39f498a7ce35de3db25957 Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Sun, 31 Jul 2022 22:39:55 +0200 Subject: [PATCH] added secret rbac --- config/rbac/role.yaml | 12 ++++++++++++ controllers/srlinux_controller.go | 1 + 2 files changed, 13 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 8a07885..944349a 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -30,6 +30,18 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - kne.srlinux.dev resources: diff --git a/controllers/srlinux_controller.go b/controllers/srlinux_controller.go index f26ee3a..1d9f2a7 100644 --- a/controllers/srlinux_controller.go +++ b/controllers/srlinux_controller.go @@ -78,6 +78,7 @@ type SrlinuxReconciler struct { // +kubebuilder:rbac:groups=kne.srlinux.dev,resources=srlinuxes/finalizers,verbs=update // +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core,resources=secrets,verbs=get;list;watch;create;update;patch;delete // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state.