From 8ce4f8b206b3d8f37678bc4e07b448719ce75445 Mon Sep 17 00:00:00 2001 From: cabrinha Date: Fri, 6 Dec 2024 09:42:09 -0700 Subject: [PATCH] [opentelemetry-kube-stack] Make hostNetwork and shareProcessNamespace optional --- charts/opentelemetry-kube-stack/Chart.yaml | 2 +- .../examples/cloud-demo/rendered/bridge.yaml | 2 +- .../examples/cloud-demo/rendered/collector.yaml | 8 ++------ .../examples/cloud-demo/rendered/hooks.yaml | 2 +- .../examples/cloud-demo/rendered/instrumentation.yaml | 2 +- .../examples/prometheus-otel/rendered/collector.yaml | 4 +--- .../exporters/kube-api-server/servicemonitor.yaml | 2 +- .../exporters/kube-controller-manager/service.yaml | 2 +- .../exporters/kube-controller-manager/servicemonitor.yaml | 2 +- .../rendered/exporters/kube-dns/service.yaml | 2 +- .../rendered/exporters/kube-dns/servicemonitor.yaml | 2 +- .../rendered/exporters/kube-etcd/service.yaml | 2 +- .../rendered/exporters/kube-etcd/servicemonitor.yaml | 2 +- .../rendered/exporters/kube-proxy/service.yaml | 2 +- .../rendered/exporters/kube-proxy/servicemonitor.yaml | 2 +- .../rendered/exporters/kube-scheduler/service.yaml | 2 +- .../rendered/exporters/kube-scheduler/servicemonitor.yaml | 2 +- .../examples/prometheus-otel/rendered/hooks.yaml | 2 +- charts/opentelemetry-kube-stack/templates/collector.yaml | 4 ++++ 19 files changed, 23 insertions(+), 25 deletions(-) diff --git a/charts/opentelemetry-kube-stack/Chart.yaml b/charts/opentelemetry-kube-stack/Chart.yaml index 439991b59..804aef838 100644 --- a/charts/opentelemetry-kube-stack/Chart.yaml +++ b/charts/opentelemetry-kube-stack/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-kube-stack -version: 0.3.4 +version: 0.3.5 description: | OpenTelemetry Quickstart chart for Kubernetes. Installs an operator and collector for an easy way to get started with Kubernetes observability. diff --git a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/bridge.yaml b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/bridge.yaml index 3bba0fa8d..75414c815 100644 --- a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/bridge.yaml +++ b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/bridge.yaml @@ -5,7 +5,7 @@ kind: OpAMPBridge metadata: name: example labels: - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/collector.yaml b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/collector.yaml index 105dd2b8e..3b6f6aff5 100644 --- a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/collector.yaml +++ b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/collector.yaml @@ -6,7 +6,7 @@ metadata: name: example-cluster-stats namespace: default labels: - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" @@ -135,8 +135,6 @@ spec: replicas: 1 imagePullPolicy: IfNotPresent upgradeStrategy: automatic - hostNetwork: false - shareProcessNamespace: false terminationGracePeriodSeconds: 30 resources: limits: @@ -189,7 +187,7 @@ metadata: name: example-daemon namespace: default labels: - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" @@ -589,8 +587,6 @@ spec: - otlp imagePullPolicy: IfNotPresent upgradeStrategy: automatic - hostNetwork: false - shareProcessNamespace: false terminationGracePeriodSeconds: 30 resources: limits: diff --git a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/hooks.yaml b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/hooks.yaml index d57f07882..7f811c0f9 100644 --- a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/hooks.yaml +++ b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/hooks.yaml @@ -62,4 +62,4 @@ spec: - -c - | kubectl delete instrumentations,opampbridges,opentelemetrycollectors \ - -l helm.sh/chart=opentelemetry-kube-stack-0.3.4 + -l helm.sh/chart=opentelemetry-kube-stack-0.3.5 diff --git a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/instrumentation.yaml b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/instrumentation.yaml index 94b14f69c..f4794ceab 100644 --- a/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/instrumentation.yaml +++ b/charts/opentelemetry-kube-stack/examples/cloud-demo/rendered/instrumentation.yaml @@ -5,7 +5,7 @@ kind: Instrumentation metadata: name: example labels: - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/collector.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/collector.yaml index 2e3eddf81..2e35fd577 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/collector.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/collector.yaml @@ -6,7 +6,7 @@ metadata: name: example-daemon namespace: default labels: - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" @@ -294,8 +294,6 @@ spec: - otlp imagePullPolicy: IfNotPresent upgradeStrategy: automatic - hostNetwork: false - shareProcessNamespace: false terminationGracePeriodSeconds: 30 resources: limits: diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-api-server/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-api-server/servicemonitor.yaml index cd97d80f0..acd3c8569 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-api-server/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-api-server/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-apiserver - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/service.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/service.yaml index 9ce16d699..95d62d1ca 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/service.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/service.yaml @@ -7,7 +7,7 @@ metadata: labels: app: opentelemetry-kube-stack-kube-controller-manager jobLabel: kube-controller-manager - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/servicemonitor.yaml index 1a00982c6..37795013d 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-controller-manager/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-kube-controller-manager - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/service.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/service.yaml index bc0e2c35d..08545b186 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/service.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/service.yaml @@ -7,7 +7,7 @@ metadata: labels: app: opentelemetry-kube-stack-kube-dns jobLabel: kube-dns - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/servicemonitor.yaml index 9e54b45d7..c98c79291 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-dns/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-kube-dns - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/service.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/service.yaml index 585c0219e..2274299ea 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/service.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/service.yaml @@ -7,7 +7,7 @@ metadata: labels: app: opentelemetry-kube-stack-kube-etcd jobLabel: kube-etcd - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/servicemonitor.yaml index 7a86ba132..8c632bd8d 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-etcd/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-kube-etcd - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/service.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/service.yaml index 84c606734..3247bb4af 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/service.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/service.yaml @@ -7,7 +7,7 @@ metadata: labels: app: opentelemetry-kube-stack-kube-proxy jobLabel: kube-proxy - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/servicemonitor.yaml index 34293decb..4d6cad4dc 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-proxy/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-kube-proxy - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/service.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/service.yaml index 190004198..f9e05e3ca 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/service.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/service.yaml @@ -7,7 +7,7 @@ metadata: labels: app: opentelemetry-kube-stack-kube-scheduler jobLabel: kube-scheduler - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/servicemonitor.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/servicemonitor.yaml index f66e74673..695c79d6a 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/servicemonitor.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/exporters/kube-scheduler/servicemonitor.yaml @@ -7,7 +7,7 @@ metadata: namespace: default labels: app: opentelemetry-kube-stack-kube-scheduler - helm.sh/chart: opentelemetry-kube-stack-0.3.4 + helm.sh/chart: opentelemetry-kube-stack-0.3.5 app.kubernetes.io/version: "0.107.0" app.kubernetes.io/managed-by: Helm release: "example" diff --git a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/hooks.yaml b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/hooks.yaml index d57f07882..7f811c0f9 100644 --- a/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/hooks.yaml +++ b/charts/opentelemetry-kube-stack/examples/prometheus-otel/rendered/hooks.yaml @@ -62,4 +62,4 @@ spec: - -c - | kubectl delete instrumentations,opampbridges,opentelemetrycollectors \ - -l helm.sh/chart=opentelemetry-kube-stack-0.3.4 + -l helm.sh/chart=opentelemetry-kube-stack-0.3.5 diff --git a/charts/opentelemetry-kube-stack/templates/collector.yaml b/charts/opentelemetry-kube-stack/templates/collector.yaml index d20a6ddf8..b199132f1 100644 --- a/charts/opentelemetry-kube-stack/templates/collector.yaml +++ b/charts/opentelemetry-kube-stack/templates/collector.yaml @@ -35,8 +35,12 @@ spec: {{- end }} imagePullPolicy: {{ $collector.image.pullPolicy }} upgradeStrategy: {{ $collector.upgradeStrategy }} + {{- if $collector.hostNetwork }} hostNetwork: {{ $collector.hostNetwork }} + {{- end }} + {{- if $collector.shareProcessNamespace }} shareProcessNamespace: {{ $collector.shareProcessNamespace }} + {{- end }} {{- if $collector.priorityClassName }} priorityClassName: {{ $collector.priorityClassName }} {{- end }}