From a4e2d582920ab9aaec6eef4d6585500cb8d79fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20=C3=81guas?= Date: Thu, 7 Sep 2023 17:09:57 +0200 Subject: [PATCH] [collector] limit prometheus rules to opentelemetrycollector application (#885) Signed-off-by: Andre Baptista Aguas --- charts/opentelemetry-operator/Chart.yaml | 2 +- .../operator-webhook-with-cert-manager.yaml | 4 ++-- .../examples/default/rendered/certmanager.yaml | 4 ++-- .../examples/default/rendered/clusterrole.yaml | 6 +++--- .../examples/default/rendered/clusterrolebinding.yaml | 4 ++-- .../examples/default/rendered/deployment.yaml | 2 +- .../examples/default/rendered/role.yaml | 2 +- .../examples/default/rendered/rolebinding.yaml | 2 +- .../examples/default/rendered/service.yaml | 4 ++-- .../examples/default/rendered/serviceaccount.yaml | 2 +- .../default/rendered/tests/test-certmanager-connection.yaml | 2 +- .../default/rendered/tests/test-service-connection.yaml | 4 ++-- charts/opentelemetry-operator/templates/prometheusrule.yaml | 4 ++-- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index 62fdf8025..839279f23 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.36.0 +version: 0.37.0 description: OpenTelemetry Operator Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml index a9a168f1e..17107ee55 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -85,7 +85,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml index 932b07964..83a76f787 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml index 5e3ecb406..7408e55a7 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -214,7 +214,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -232,7 +232,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml index df3763828..d65d60a1e 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml index 27f7fd6ca..448f2d711 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/role.yaml b/charts/opentelemetry-operator/examples/default/rendered/role.yaml index 49fa75532..e0dacc59d 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml index e196b1e0f..c360138f4 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index 2926d9e74..47ce2c3b6 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -31,7 +31,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml index c3800d8d9..6e2769277 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: opentelemetry-operator namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml index 1c8e0cfb5..f2c7732a7 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-cert-manager" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml index 22886901a..95ce883a5 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-metrics" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm @@ -43,7 +43,7 @@ metadata: name: "example-opentelemetry-operator-webhook" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.36.0 + helm.sh/chart: opentelemetry-operator-0.37.0 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.83.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/templates/prometheusrule.yaml b/charts/opentelemetry-operator/templates/prometheusrule.yaml index 2b86f0fc1..8f6b82d5f 100644 --- a/charts/opentelemetry-operator/templates/prometheusrule.yaml +++ b/charts/opentelemetry-operator/templates/prometheusrule.yaml @@ -23,7 +23,7 @@ spec: - name: managerRules rules: - alert: ReconcileErrors - expr: rate(controller_runtime_reconcile_total{result="error"}[5m]) > 0 + expr: rate(controller_runtime_reconcile_total{controller="opentelemetrycollector",result="error"}[5m]) > 0 for: 5m labels: severity: warning @@ -31,7 +31,7 @@ spec: description: '{{`Reconciliation errors for {{ $labels.controller }} is increasing and has now reached {{ humanize $value }} `}}' runbook_url: 'Check manager logs for reasons why this might happen' - alert: WorkqueueDepth - expr: workqueue_depth > 0 + expr: workqueue_depth{name="opentelemetrycollector"} > 0 for: 5m labels: severity: warning