From 72434d0a8e775e2f6e23ffa42b76ae5e8effaecc Mon Sep 17 00:00:00 2001 From: "Mateusz \"mat\" Rumian" <58699800+mat-rumian@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:48:23 +0100 Subject: [PATCH] feat: update opentelemetry-operator chart and fix progagators list in instrumentation resource (#2630) * chore(helm): update opentelemetry-operator chart 0.18.3 * chore(helm): update chart version 2.18.2 * feat(instrumentation): fix propagators, update dotnet instrumentation img * feat(instrumentationjob): use specified image * feat(operator): add possbility to set instrumentationjob img * chore(helmtests): update tests * docs(reamde): update parameters list * docs(changelog): update * docs(readme): update matrix --- CHANGELOG.md | 2 ++ deploy/README.md | 4 ++-- deploy/helm/sumologic/Chart.yaml | 6 +++--- deploy/helm/sumologic/README.md | 4 +++- .../opentelemetry-operator/instrumentation.cr.yaml | 6 +----- .../job-instrumentation-cr.yaml | 3 ++- deploy/helm/sumologic/values.yaml | 10 ++++++++-- .../static/instrumentation.output.yaml | 12 ++---------- .../static/job.output.yaml | 2 +- 9 files changed, 24 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aea8da4d3c..851b8a2751 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,10 +20,12 @@ for differences between Telegraf Operator Helm Chart 1.3.5 and Telegraf Operator - chore: remove support for kOps 1.20 [#2592] - chore(fluent-bit): update Fluent Bit Helm Chart to 0.20.9 [#2596] - chore(telegraf-operator): update Telegraf Operator Helm Chart to 1.3.10 [#2598] +- feat: update opentelemetry-operator chart and fix progagators list in instrumentation resource [#2630] [#2592]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2592 [#2596]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2596 [#2598]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2598 +[#2630]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/2630 [Unreleased]: https://github.com/SumoLogic/sumologic-kubernetes-collection/compare/v2.18.1...main [telegraf_operator_comapare_1.3.5_and_1.3.10]: https://github.com/influxdata/helm-charts/compare/telegraf-operator-1.3.5...telegraf-operator-1.3.10 [cert-manager-1.4]: https://github.com/cert-manager/cert-manager/releases/tag/v1.4.0 diff --git a/deploy/README.md b/deploy/README.md index f28166f09f..412b7d071b 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -90,8 +90,8 @@ The following matrix displays the tested package versions for our Helm chart. | Sumo Logic Helm Chart | kube-prometheus-stack/Prometheus Operator | FluentD | Fluent Bit | Falco | Metrics Server | Telegraf Operator | Tailing Sidecar Operator | OpenTelemetry Operator | |:----------------------|:------------------------------------------|:--------|:------------------------------------|:-------|:---------------|:------------------|:-------------------------|:-----------------------| -| latest | 12.10.0 | 1.14.6 | 0.20.9 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.4 | 0.13.0 | -| 2.18.0 | 12.10.0 | 1.14.6 | 0.20.2 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.4 | 0.13.0 | +| 2.18.2 - latest | 12.10.0 | 1.14.6 | 0.20.9 | 1.18.6 | 5.11.9 | 1.3.10 | 0.3.4 | 0.18.3 | +| 2.18.0 - 2.18.1 | 12.10.0 | 1.14.6 | 0.20.2 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.4 | 0.13.0 | | 2.16.0 - 2.17.0 | 12.10.0 | 1.14.6 | 0.20.2 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.4 | 0.7.0 | | 2.14.1 - 2.15.0 | 12.10.0 | 1.14.6 | 0.20.2 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.3 | 0.7.0 | | 2.11.0 - 2.14.0 | 12.10.0 | 1.14.6 | 0.20.2 | 1.18.6 | 5.11.9 | 1.3.5 | 0.3.2 | 0.7.0 | diff --git a/deploy/helm/sumologic/Chart.yaml b/deploy/helm/sumologic/Chart.yaml index 92a986e708..3c6ff62846 100644 --- a/deploy/helm/sumologic/Chart.yaml +++ b/deploy/helm/sumologic/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: sumologic -version: 2.18.1 -appVersion: 2.18.1 +version: 2.18.2 +appVersion: 2.18.2 description: A Helm chart for collecting Kubernetes logs, metrics, traces and events into Sumo Logic. type: application keywords: @@ -37,6 +37,6 @@ dependencies: repository: https://sumologic.github.io/tailing-sidecar condition: tailing-sidecar-operator.enabled - name: opentelemetry-operator - version: 0.13.0 + version: 0.18.3 repository: https://open-telemetry.github.io/opentelemetry-helm-charts condition: opentelemetry-operator.enabled diff --git a/deploy/helm/sumologic/README.md b/deploy/helm/sumologic/README.md index a75667f93f..f458c72ef9 100644 --- a/deploy/helm/sumologic/README.md +++ b/deploy/helm/sumologic/README.md @@ -305,7 +305,9 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `opentelemetry-operator.enabled` | Flag to control deploying OpenTelemetry Operator Helm sub-chart. | `false` | | `opentelemetry-operator.createDefaultInstrumentation` | Flag to control creation of default Instrumentation object | `false` | | `opentelemetry-operator.instrumentationNamespaces` | Used to create `Instrumentation` resources in specified namespaces. | `Nil` | -| `otelagent.enabled` | Enables OpenTelemetry Collector Agent mode DaemonSet. | `false` | +| `opentelemetry-operator.instrumentationJobImage.image.repository` | Name of the image repository used to apply Instrumentation resource | `sumologic/kubernetes-tools` | +| `opentelemetry-operator.instrumentationJobImage.image.tag` | Name of the image tag used to apply Instrumentation resource | `2.13.0` | +| `otelagent.enabled` | Enables OpenTelemetry Collector Agent mode DaemonSet. | `true` | | `otelagent.daemonset.nodeSelector` | Node selector for otelagent daemonset. [See docs/Best_Practices.md for more information.](../../docs/Best_Practices.md) | `{}` | | `otelagent.daemonset.priorityClassName` | Priority class name for OpenTelemetry Agent trace pods. | If not provided then set to `RELEASE-NAME-sumologic-priorityclass`. | | `otelcol.deployment.replicas` | Set the number of OpenTelemetry Collector replicas. | `1` | diff --git a/deploy/helm/sumologic/conf/opentelemetry-operator/instrumentation.cr.yaml b/deploy/helm/sumologic/conf/opentelemetry-operator/instrumentation.cr.yaml index 4e562c5ee2..b785c855c4 100644 --- a/deploy/helm/sumologic/conf/opentelemetry-operator/instrumentation.cr.yaml +++ b/deploy/helm/sumologic/conf/opentelemetry-operator/instrumentation.cr.yaml @@ -17,8 +17,6 @@ spec: propagators: - tracecontext - baggage - - b3 - - xray resource: addK8sUIDAttributes: false sampler: @@ -29,10 +27,8 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES value: application={{ $ns }} dotnet: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.3.1-beta.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.4.0-beta.1 env: - - name: OTEL_PROPAGATORS - value: tracecontext,baggage - name: OTEL_METRICS_EXPORTER value: none - name: OTEL_LOGS_EXPORTER diff --git a/deploy/helm/sumologic/templates/opentelemetry-operator/job-instrumentation-cr.yaml b/deploy/helm/sumologic/templates/opentelemetry-operator/job-instrumentation-cr.yaml index 1b62e1f217..69d46ff7ae 100644 --- a/deploy/helm/sumologic/templates/opentelemetry-operator/job-instrumentation-cr.yaml +++ b/deploy/helm/sumologic/templates/opentelemetry-operator/job-instrumentation-cr.yaml @@ -2,6 +2,7 @@ {{ $tracesEnabled := .Values.sumologic.traces.enabled }} {{ $createDefaultInstrumentation := index .Values "opentelemetry-operator" "createDefaultInstrumentation" }} {{- if and $operatorEnabled $tracesEnabled $createDefaultInstrumentation }} +{{ $instrumentationJobImage := index .Values "opentelemetry-operator" "instrumentationJobImage" "image" }} apiVersion: batch/v1 kind: Job metadata: @@ -15,7 +16,7 @@ spec: serviceAccountName: {{ template "sumologic.metadata.name.roles.serviceaccount" . }} containers: - name: instrumentation-cr-applier - image: sumologic/kubernetes-tools + image: {{ $instrumentationJobImage.repository }}:{{ $instrumentationJobImage.tag }} volumeMounts: - name: instrumentation-cr-configmap mountPath: /tmp/instrumentation-cr.yaml diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index 7bbc485ea6..ee62303c7e 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -5104,15 +5104,21 @@ tailing-sidecar-operator: scc: create: false -## Configure OpenTelemetry Operator - Tracing +## Configure OpenTelemetry Operator - Instrumentation ## ref: https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator opentelemetry-operator: enabled: false - ## Specific for Tracing - Instrumentation resource creation + ## Specific for Sumo Logic chart - Instrumentation resource creation + instrumentationJobImage: + image: + repository: sumologic/kubernetes-tools + tag: 2.13.0 + createDefaultInstrumentation: false instrumentationNamespaces: "" + ## Specific for OpenTelemetry Operator chart values admissionWebhooks: failurePolicy: Fail enabled: true diff --git a/tests/helm/opentelemetry_operator_instrumentation_cr_configmap/static/instrumentation.output.yaml b/tests/helm/opentelemetry_operator_instrumentation_cr_configmap/static/instrumentation.output.yaml index 242f6fddfe..79e5b154c5 100644 --- a/tests/helm/opentelemetry_operator_instrumentation_cr_configmap/static/instrumentation.output.yaml +++ b/tests/helm/opentelemetry_operator_instrumentation_cr_configmap/static/instrumentation.output.yaml @@ -27,8 +27,6 @@ data: propagators: - tracecontext - baggage - - b3 - - xray resource: addK8sUIDAttributes: false sampler: @@ -39,10 +37,8 @@ data: - name: OTEL_RESOURCE_ATTRIBUTES value: application=ot-operator1 dotnet: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.3.1-beta.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.4.0-beta.1 env: - - name: OTEL_PROPAGATORS - value: tracecontext,baggage - name: OTEL_METRICS_EXPORTER value: none - name: OTEL_LOGS_EXPORTER @@ -93,8 +89,6 @@ data: propagators: - tracecontext - baggage - - b3 - - xray resource: addK8sUIDAttributes: false sampler: @@ -105,10 +99,8 @@ data: - name: OTEL_RESOURCE_ATTRIBUTES value: application=ot-operator2 dotnet: - image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.3.1-beta.1 + image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet:0.4.0-beta.1 env: - - name: OTEL_PROPAGATORS - value: tracecontext,baggage - name: OTEL_METRICS_EXPORTER value: none - name: OTEL_LOGS_EXPORTER diff --git a/tests/helm/opentelemetry_operator_instrumentation_cr_job/static/job.output.yaml b/tests/helm/opentelemetry_operator_instrumentation_cr_job/static/job.output.yaml index 891de9f42f..3b94a1eab4 100644 --- a/tests/helm/opentelemetry_operator_instrumentation_cr_job/static/job.output.yaml +++ b/tests/helm/opentelemetry_operator_instrumentation_cr_job/static/job.output.yaml @@ -15,7 +15,7 @@ spec: serviceAccountName: RELEASE-NAME-sumologic containers: - name: instrumentation-cr-applier - image: sumologic/kubernetes-tools + image: sumologic/kubernetes-tools:2.13.0 volumeMounts: - name: instrumentation-cr-configmap mountPath: /tmp/instrumentation-cr.yaml