From 897ee4b882a817f042d3572ddcb34d448cb7a432 Mon Sep 17 00:00:00 2001 From: birca Date: Fri, 4 Nov 2022 11:13:07 +0200 Subject: [PATCH] Trim unnecessary otelcol operator verbs Signed-off-by: birca --- .../manifests/opentelemetry-operator.clusterserviceversion.yaml | 2 -- config/manager/kustomization.yaml | 2 +- config/rbac/role.yaml | 2 -- controllers/opentelemetrycollector_controller.go | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml index c529a995bc..007b9c3b18 100644 --- a/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -236,8 +236,6 @@ spec: resources: - opentelemetrycollectors verbs: - - create - - delete - get - list - patch diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2e6cc79764..5c5f0b84cb 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -1,2 +1,2 @@ resources: -- manager.yaml \ No newline at end of file +- manager.yaml diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 5655552356..7dc982d34e 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -147,8 +147,6 @@ rules: resources: - opentelemetrycollectors verbs: - - create - - delete - get - list - patch diff --git a/controllers/opentelemetrycollector_controller.go b/controllers/opentelemetrycollector_controller.go index 11483b6fb9..8e986c4695 100644 --- a/controllers/opentelemetrycollector_controller.go +++ b/controllers/opentelemetrycollector_controller.go @@ -125,7 +125,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,verbs=get;list;watch;update;patch // +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=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete