From 23e862d9f01ec28dbdb15b217a90f2ae203f05f3 Mon Sep 17 00:00:00 2001 From: Ruben Vargas Date: Tue, 23 Feb 2021 23:05:47 -0600 Subject: [PATCH] Add permissions for opentelemetry finalizer resource Signed-off-by: Ruben Vargas --- config/rbac/role.yaml | 8 ++++++++ controllers/opentelemetrycollector_controller.go | 1 + 2 files changed, 9 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 131ae3e7ce..ae6a38711d 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -94,6 +94,14 @@ rules: - patch - update - watch +- apiGroups: + - opentelemetry.io + resources: + - opentelemetrycollectors/finalizers + verbs: + - get + - patch + - update - apiGroups: - opentelemetry.io resources: diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 36ca7738fb..c687dd37e6 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -105,6 +105,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler { // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors/finalizers,verbs=get;update;patch // +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update // Reconcile the current state of an OpenTelemetry collector resource with the desired state.