From c596b9a170cda17b2f33998cca9be5752152fdf6 Mon Sep 17 00:00:00 2001 From: Alex Raiu Date: Thu, 5 Dec 2024 19:05:14 +0200 Subject: [PATCH] Update operator clusterrole * `secrets`: Add TLS support to auto-instrumentation [#3338](https://github.com/open-telemetry/opentelemetry-operator/pull/3338) * `targetallocators`: Generate only TargetAllocator CR from Collector CR [#3402](https://github.com/open-telemetry/opentelemetry-operator/pull/3402) --- .../feature-gates/rendered/clusterrole.yaml | 20 ++++++++++++++++ .../templates/clusterrole.yaml | 23 +++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml index fe943574c..734edbc50 100644 --- a/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/feature-gates/rendered/clusterrole.yaml @@ -216,6 +216,26 @@ rules: - patch - update - watch + - apiGroups: + - opentelemetry.io + resources: + - targetallocators + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - targetallocators/status + verbs: + - get + - patch + - update - apiGroups: - cert-manager.io resources: diff --git a/charts/opentelemetry-operator/templates/clusterrole.yaml b/charts/opentelemetry-operator/templates/clusterrole.yaml index e37e9adba..030d11b89 100644 --- a/charts/opentelemetry-operator/templates/clusterrole.yaml +++ b/charts/opentelemetry-operator/templates/clusterrole.yaml @@ -92,6 +92,7 @@ rules: resources: - nodes - namespaces + - secrets verbs: - get - list @@ -236,6 +237,28 @@ rules: - update - watch {{- if .Values.manager.featureGatesMap }} + {{- if ".Values.manager.featureGatesMap.operator.targetAllocatorCR" }} + - apiGroups: + - opentelemetry.io + resources: + - targetallocators + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - opentelemetry.io + resources: + - targetallocators/status + verbs: + - get + - patch + - update + {{- end }} {{- if ".Values.manager.featureGatesMap.operator.targetallocator.mtls" }} - apiGroups: - cert-manager.io