From 2f2ecd46ac642e48eb5dc78794ce3717adf32a21 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 08:41:35 -0600 Subject: [PATCH 1/8] Add ability to enable GOMEMLIMIT --- charts/opentelemetry-collector/Chart.yaml | 2 +- charts/opentelemetry-collector/UPGRADING.md | 10 ++ .../ci/GOMEMLIMIT-values.yaml | 3 + .../rendered/configmap-agent.yaml | 2 +- .../rendered/configmap.yaml | 2 +- .../rendered/daemonset.yaml | 4 +- .../rendered/deployment.yaml | 4 +- .../rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap-agent.yaml | 2 +- .../rendered/daemonset.yaml | 4 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap-agent.yaml | 2 +- .../rendered/daemonset.yaml | 4 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap-agent.yaml | 2 +- .../rendered/daemonset.yaml | 4 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap-agent.yaml | 2 +- .../daemonset-only/rendered/daemonset.yaml | 4 +- .../rendered/serviceaccount.yaml | 2 +- .../deployment-only/rendered/configmap.yaml | 2 +- .../deployment-only/rendered/deployment.yaml | 4 +- .../deployment-only/rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap.yaml | 2 +- .../rendered/deployment.yaml | 4 +- .../rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/deployment.yaml | 2 +- .../rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/clusterrole.yaml | 2 +- .../rendered/clusterrolebinding.yaml | 2 +- .../rendered/configmap.yaml | 2 +- .../rendered/deployment.yaml | 4 +- .../rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/configmap-statefulset.yaml | 2 +- .../statefulset-only/rendered/service.yaml | 2 +- .../rendered/serviceaccount.yaml | 2 +- .../rendered/statefulset.yaml | 4 +- .../using-GOMEMLIMIT/rendered/configmap.yaml | 84 ++++++++++++++++ .../using-GOMEMLIMIT/rendered/deployment.yaml | 98 +++++++++++++++++++ .../using-GOMEMLIMIT/rendered/service.yaml | 48 +++++++++ .../rendered/serviceaccount.yaml | 13 +++ .../examples/using-GOMEMLIMIT/values.yaml | 6 ++ .../templates/NOTES.txt | 4 + .../templates/_config.tpl | 15 ++- .../templates/_helpers.tpl | 34 +++++++ .../templates/_pod.tpl | 4 + .../values.schema.json | 3 + charts/opentelemetry-collector/values.yaml | 8 ++ 53 files changed, 377 insertions(+), 53 deletions(-) create mode 100644 charts/opentelemetry-collector/ci/GOMEMLIMIT-values.yaml create mode 100644 charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/configmap.yaml create mode 100644 charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/deployment.yaml create mode 100644 charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/service.yaml create mode 100644 charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/serviceaccount.yaml create mode 100644 charts/opentelemetry-collector/examples/using-GOMEMLIMIT/values.yaml diff --git a/charts/opentelemetry-collector/Chart.yaml b/charts/opentelemetry-collector/Chart.yaml index bb80b73c4..bfb90808f 100644 --- a/charts/opentelemetry-collector/Chart.yaml +++ b/charts/opentelemetry-collector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-collector -version: 0.68.1 +version: 0.69.0 description: OpenTelemetry Collector Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-collector/UPGRADING.md b/charts/opentelemetry-collector/UPGRADING.md index 82ba2429b..3b8ae864c 100644 --- a/charts/opentelemetry-collector/UPGRADING.md +++ b/charts/opentelemetry-collector/UPGRADING.md @@ -4,6 +4,16 @@ These upgrade guidelines only contain instructions for version upgrades which re If the version you want to upgrade to is not listed here, then there is nothing to do for you. Just upgrade and enjoy. +## something to soemthing + +A new flag, `useGOMEMLIMIT` has been added that allows specifying whether or not the chart should use the `GOMEMLIMIT` environment variable or the Memory Ballast Extension. +When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` envarionment variable that is set to 80% +of the configures `resources.limits.memory`. If no `resources.limits.memory` are set when `useGOMEMLIMIT` is enabled then a `GOMEMLIMIT` envarionment variable WILL NOT be +created but the Memory Ballast Extension will still be removed. + +If you are not interested in using `GOMEMLIMIT` then this change does not affect you. But, depending on the progress made in [Issue 891](https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891), +the use of `GOMEMLIMIT` may completely replace the Memory Ballast Extension in the future. + ## 0.67 to 0.68 The `preset.kubernetesEvents` preset now excludes `DELETED` watch types so that an log is not ingested when Kubernetes deletes an event. diff --git a/charts/opentelemetry-collector/ci/GOMEMLIMIT-values.yaml b/charts/opentelemetry-collector/ci/GOMEMLIMIT-values.yaml new file mode 100644 index 000000000..6622d50eb --- /dev/null +++ b/charts/opentelemetry-collector/ci/GOMEMLIMIT-values.yaml @@ -0,0 +1,3 @@ +mode: deployment + +useGOMEMLIMIT: true diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap-agent.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap-agent.yaml index 5ce826588..b88212d6b 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap-agent.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap-agent.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap.yaml index 764b2bd8a..283a29507 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/configmap.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/daemonset.yaml index edf606be5..ae5734af5 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/daemonset.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/daemonset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 6791cf851227c20b968f821cc281eef9564df408816e73fd475fdf1ffb71df20 + checksum/config: 5c3f2e92433228d8e55362f7710de4f44057d8a6c92fa3b0962d23d9d174836f labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/deployment.yaml index 7b7e98358..2c6b41ecf 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/deployment.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: ce45e00e72e2e1066e6c7857a8b35deff9927007ad74234f36e6d399d9f7b6dd + checksum/config: 5b6d56e7bb578f048603e2c0034a2800ac17b2efcf69a972c8f2a60c5a71b1f4 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/service.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/service.yaml index a56dcffab..7ec95bc92 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-and-deployment/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/configmap-agent.yaml b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/configmap-agent.yaml index e7944defd..1f9649ccc 100644 --- a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/configmap-agent.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/configmap-agent.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/daemonset.yaml index 4d7eee8af..e434f2059 100644 --- a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/daemonset.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/daemonset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: ba5046b883bc1bffbcaf7f37432c787ca1345ce16ee1c9298b7c02a0daf9c7c5 + checksum/config: 76e81780241099b788323d1b3343a3adf3e90bc26ab67c5124181143b6ca6dfd labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-collector-logs/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/configmap-agent.yaml b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/configmap-agent.yaml index 2e31d7b6d..f782e6034 100644 --- a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/configmap-agent.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/configmap-agent.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml index da198c676..f6edb3c36 100644 --- a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: b184ed22ab0b25faeeb8a3f205db220caee2c77484cb870f36a340bd1a2eaab9 + checksum/config: 1a10fd86db90be8952f10ab3e21e4ec44e3e9101ec14e13b6e044073b1219a52 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/configmap-agent.yaml b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/configmap-agent.yaml index d7e2cb981..a428caf02 100644 --- a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/configmap-agent.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/configmap-agent.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/daemonset.yaml index ff49fce4f..2952f1f78 100644 --- a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/daemonset.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/daemonset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 57a7876cb588d5268cdec1523b63518a27fab34e7e9a37c21c2706d5d1b2118e + checksum/config: 5137449a07655ef296e6fa38acfc03aa13396987838745886334e5a585073a85 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-lifecycle-hooks/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-only/rendered/configmap-agent.yaml b/charts/opentelemetry-collector/examples/daemonset-only/rendered/configmap-agent.yaml index d7e2cb981..a428caf02 100644 --- a/charts/opentelemetry-collector/examples/daemonset-only/rendered/configmap-agent.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-only/rendered/configmap-agent.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml index 5bb241dd0..7d497c213 100644 --- a/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-agent namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 57a7876cb588d5268cdec1523b63518a27fab34e7e9a37c21c2706d5d1b2118e + checksum/config: 5137449a07655ef296e6fa38acfc03aa13396987838745886334e5a585073a85 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/daemonset-only/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/daemonset-only/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/daemonset-only/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/daemonset-only/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml index 764b2bd8a..283a29507 100644 --- a/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml +++ b/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml index 6ab620cf0..67539bd44 100644 --- a/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml +++ b/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: ce45e00e72e2e1066e6c7857a8b35deff9927007ad74234f36e6d399d9f7b6dd + checksum/config: 5b6d56e7bb578f048603e2c0034a2800ac17b2efcf69a972c8f2a60c5a71b1f4 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/service.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/service.yaml index a56dcffab..7ec95bc92 100644 --- a/charts/opentelemetry-collector/examples/deployment-only/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/deployment-only/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/configmap.yaml index 6b63d42b8..0b98e71b4 100644 --- a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/configmap.yaml +++ b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/configmap.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/deployment.yaml index a622c3456..2b8073d61 100644 --- a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/deployment.yaml +++ b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: c9d97d41dcf44bd8170b0a919013c53380abe37cc0c72f67db05d5b4c1baca71 + checksum/config: 92d12d02f829afe7ff50d6963ead873f7dabaa80392690bceb05567f50d1ec5c labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/service.yaml b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/service.yaml index c22f29643..c68e1031b 100644 --- a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/deployment-otlp-traces/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/deployment.yaml index d960cfb56..1130b7315 100644 --- a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/deployment.yaml +++ b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/service.yaml b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/service.yaml index a56dcffab..7ec95bc92 100644 --- a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/deployment-use-existing-configMap/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml index 843e8e582..875d66efd 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml @@ -5,7 +5,7 @@ kind: ClusterRole metadata: name: example-opentelemetry-collector labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml index 6e3e9c5c2..3e06efb0b 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml @@ -5,7 +5,7 @@ kind: ClusterRoleBinding metadata: name: example-opentelemetry-collector labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml index d8dffe9b8..a8843e200 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml index 6c4280aff..0d3630b25 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: 6dda7c7d2f22a234f9095f79a59e721080faf12a0638179e5dc72fa986915a8b + checksum/config: b18fe67c942e7ded6b5ad70b319f8a591342de5b2229a7cc2318687a402599c8 labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/service.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/service.yaml index a56dcffab..7ec95bc92 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/configmap-statefulset.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/configmap-statefulset.yaml index 808b8aa9b..de174478c 100644 --- a/charts/opentelemetry-collector/examples/statefulset-only/rendered/configmap-statefulset.yaml +++ b/charts/opentelemetry-collector/examples/statefulset-only/rendered/configmap-statefulset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector-statefulset namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml index 06cc29c2c..5ab00b7fe 100644 --- a/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml +++ b/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml index 3c0e2aa07..fb8d4a716 100644 --- a/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml index 113db5959..d3a7cc745 100644 --- a/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml +++ b/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml @@ -6,7 +6,7 @@ metadata: name: example-opentelemetry-collector namespace: default labels: - helm.sh/chart: opentelemetry-collector-0.68.1 + helm.sh/chart: opentelemetry-collector-0.69.0 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.85.0" @@ -25,7 +25,7 @@ spec: template: metadata: annotations: - checksum/config: 1797d262e405cda293dc3947989e7379a54ca6ea941bec78b931e8c616337532 + checksum/config: 72d3dc0e7eabb1d9588d88b1fa28f9dc49240b76a8c627182a984fea418a4f8a labels: app.kubernetes.io/name: opentelemetry-collector diff --git a/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/configmap.yaml new file mode 100644 index 000000000..6a3d1b89f --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/configmap.yaml @@ -0,0 +1,84 @@ +--- +# Source: opentelemetry-collector/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-opentelemetry-collector + namespace: default + labels: + helm.sh/chart: opentelemetry-collector-0.69.0 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.85.0" + app.kubernetes.io/managed-by: Helm +data: + relay: | + exporters: + logging: {} + extensions: + health_check: {} + processors: + batch: {} + memory_limiter: + check_interval: 5s + limit_percentage: 80 + spike_limit_percentage: 25 + receivers: + jaeger: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:14250 + thrift_compact: + endpoint: ${env:MY_POD_IP}:6831 + thrift_http: + endpoint: ${env:MY_POD_IP}:14268 + otlp: + protocols: + grpc: + endpoint: ${env:MY_POD_IP}:4317 + http: + endpoint: ${env:MY_POD_IP}:4318 + prometheus: + config: + scrape_configs: + - job_name: opentelemetry-collector + scrape_interval: 10s + static_configs: + - targets: + - ${env:MY_POD_IP}:8888 + zipkin: + endpoint: ${env:MY_POD_IP}:9411 + service: + extensions: + - health_check + pipelines: + logs: + exporters: + - logging + processors: + - memory_limiter + - batch + receivers: + - otlp + metrics: + exporters: + - logging + processors: + - memory_limiter + - batch + receivers: + - otlp + - prometheus + traces: + exporters: + - logging + processors: + - memory_limiter + - batch + receivers: + - otlp + - jaeger + - zipkin + telemetry: + metrics: + address: ${env:MY_POD_IP}:8888 diff --git a/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/deployment.yaml new file mode 100644 index 000000000..5ec83c77c --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/deployment.yaml @@ -0,0 +1,98 @@ +--- +# Source: opentelemetry-collector/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: example-opentelemetry-collector + namespace: default + labels: + helm.sh/chart: opentelemetry-collector-0.69.0 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.85.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + component: standalone-collector + strategy: + type: RollingUpdate + template: + metadata: + annotations: + checksum/config: 99b84284a8d33b3e7167b756db2a863d6d2efc3345e1e7b407541a948979d0d0 + + labels: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + component: standalone-collector + + spec: + + serviceAccountName: example-opentelemetry-collector + securityContext: + {} + containers: + - name: opentelemetry-collector + command: + - /otelcol-contrib + - --config=/conf/relay.yaml + securityContext: + {} + image: "otel/opentelemetry-collector-contrib:0.85.0" + imagePullPolicy: IfNotPresent + ports: + + - name: jaeger-compact + containerPort: 6831 + protocol: UDP + - name: jaeger-grpc + containerPort: 14250 + protocol: TCP + - name: jaeger-thrift + containerPort: 14268 + protocol: TCP + - name: otlp + containerPort: 4317 + protocol: TCP + - name: otlp-http + containerPort: 4318 + protocol: TCP + - name: zipkin + containerPort: 9411 + protocol: TCP + env: + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: GOMEMLIMIT + value: 156Mi + livenessProbe: + httpGet: + path: / + port: 13133 + readinessProbe: + httpGet: + path: / + port: 13133 + resources: + limits: + cpu: 100m + memory: 200M + volumeMounts: + - mountPath: /conf + name: opentelemetry-collector-configmap + volumes: + - name: opentelemetry-collector-configmap + configMap: + name: example-opentelemetry-collector + items: + - key: relay + path: relay.yaml + hostNetwork: false diff --git a/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/service.yaml b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/service.yaml new file mode 100644 index 000000000..7ec95bc92 --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/service.yaml @@ -0,0 +1,48 @@ +--- +# Source: opentelemetry-collector/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: example-opentelemetry-collector + namespace: default + labels: + helm.sh/chart: opentelemetry-collector-0.69.0 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.85.0" + app.kubernetes.io/managed-by: Helm + component: standalone-collector +spec: + type: ClusterIP + ports: + + - name: jaeger-compact + port: 6831 + targetPort: 6831 + protocol: UDP + - name: jaeger-grpc + port: 14250 + targetPort: 14250 + protocol: TCP + - name: jaeger-thrift + port: 14268 + targetPort: 14268 + protocol: TCP + - name: otlp + port: 4317 + targetPort: 4317 + protocol: TCP + appProtocol: grpc + - name: otlp-http + port: 4318 + targetPort: 4318 + protocol: TCP + - name: zipkin + port: 9411 + targetPort: 9411 + protocol: TCP + selector: + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + component: standalone-collector + internalTrafficPolicy: Cluster diff --git a/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/serviceaccount.yaml new file mode 100644 index 000000000..fb8d4a716 --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/serviceaccount.yaml @@ -0,0 +1,13 @@ +--- +# Source: opentelemetry-collector/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: example-opentelemetry-collector + namespace: default + labels: + helm.sh/chart: opentelemetry-collector-0.69.0 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.85.0" + app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/values.yaml b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/values.yaml new file mode 100644 index 000000000..61b4acc26 --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/values.yaml @@ -0,0 +1,6 @@ +mode: deployment +resources: + limits: + cpu: 100m + memory: 200M +useGOMEMLIMIT: true diff --git a/charts/opentelemetry-collector/templates/NOTES.txt b/charts/opentelemetry-collector/templates/NOTES.txt index edc448e72..0d96d9cee 100644 --- a/charts/opentelemetry-collector/templates/NOTES.txt +++ b/charts/opentelemetry-collector/templates/NOTES.txt @@ -48,3 +48,7 @@ {{- if and (eq .Values.dnsPolicy "None") (not .Values.dnsConfig) }} {{- fail "[ERROR] dnsConfig should be provided when dnsPolicy is None" }} {{ end }} + +{{- if and (.Values.useGOMEMLIMIT) (not ((((.Values.resources).limits).memory))) }} +[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied. It is best to use "useGOMEMLIMIT" when memory limits have been set. +{{ end }} diff --git a/charts/opentelemetry-collector/templates/_config.tpl b/charts/opentelemetry-collector/templates/_config.tpl index 1e1ea1e60..b8244414a 100644 --- a/charts/opentelemetry-collector/templates/_config.tpl +++ b/charts/opentelemetry-collector/templates/_config.tpl @@ -20,10 +20,19 @@ Merge user supplied config into memory limiter config. {{- if not $processorsConfig.memory_limiter }} {{- $_ := set $processorsConfig "memory_limiter" (include "opentelemetry-collector.memoryLimiter" . | fromYaml) }} {{- end }} -{{- $memoryBallastConfig := get .Values.config.extensions "memory_ballast" }} -{{- if or (not $memoryBallastConfig) (not $memoryBallastConfig.size_in_percentage) }} -{{- $_ := set $memoryBallastConfig "size_in_percentage" 40 }} + +{{- if and .Values.useGOMEMLIMIT }} + {{- if (((.Values.config).service).extensions) }} + {{- $_ := set .Values.config.service "extensions" (without .Values.config.service.extensions "memory_ballast") }} + {{- end}} + {{- $_ := unset (.Values.config.extensions) "memory_ballast" }} +{{- else }} + {{- $memoryBallastConfig := get .Values.config.extensions "memory_ballast" }} + {{- if or (not $memoryBallastConfig) (not $memoryBallastConfig.size_in_percentage) }} + {{- $_ := set $memoryBallastConfig "size_in_percentage" 40 }} + {{- end }} {{- end }} + {{- .Values.config | toYaml }} {{- end }} diff --git a/charts/opentelemetry-collector/templates/_helpers.tpl b/charts/opentelemetry-collector/templates/_helpers.tpl index 04a19f102..7dde7891a 100644 --- a/charts/opentelemetry-collector/templates/_helpers.tpl +++ b/charts/opentelemetry-collector/templates/_helpers.tpl @@ -168,3 +168,37 @@ Allow the release namespace to be overridden {{- .Release.Namespace -}} {{- end -}} {{- end -}} + +{{/* +Convert memory value to numeric value in MiB to be used by otel memory_limiter processor. +*/}} +{{- define "opentelemetry-collector.convertMemToMib" -}} +{{- $mem := lower . -}} +{{- if hasSuffix "e" $mem -}} +{{- trimSuffix "e" $mem | atoi | mul 1000 | mul 1000 | mul 1000 | mul 1000 -}} +{{- else if hasSuffix "ei" $mem -}} +{{- trimSuffix "ei" $mem | atoi | mul 1024 | mul 1024 | mul 1024 | mul 1024 -}} +{{- else if hasSuffix "p" $mem -}} +{{- trimSuffix "p" $mem | atoi | mul 1000 | mul 1000 | mul 1000 -}} +{{- else if hasSuffix "pi" $mem -}} +{{- trimSuffix "pi" $mem | atoi | mul 1024 | mul 1024 | mul 1024 -}} +{{- else if hasSuffix "t" $mem -}} +{{- trimSuffix "t" $mem | atoi | mul 1000 | mul 1000 -}} +{{- else if hasSuffix "ti" $mem -}} +{{- trimSuffix "ti" $mem | atoi | mul 1024 | mul 1024 -}} +{{- else if hasSuffix "g" $mem -}} +{{- trimSuffix "g" $mem | atoi | mul 1000 -}} +{{- else if hasSuffix "gi" $mem -}} +{{- trimSuffix "gi" $mem | atoi | mul 1024 -}} +{{- else if hasSuffix "m" $mem -}} +{{- div (trimSuffix "m" $mem | atoi | mul 1000) 1024 -}} +{{- else if hasSuffix "mi" $mem -}} +{{- trimSuffix "mi" $mem | atoi -}} +{{- else if hasSuffix "k" $mem -}} +{{- div (trimSuffix "k" $mem | atoi) 1000 -}} +{{- else if hasSuffix "ki" $mem -}} +{{- div (trimSuffix "ki" $mem | atoi) 1024 -}} +{{- else -}} +{{- div (div ($mem | atoi) 1024) 1024 -}} +{{- end -}} +{{- end -}} diff --git a/charts/opentelemetry-collector/templates/_pod.tpl b/charts/opentelemetry-collector/templates/_pod.tpl index f23af4ef9..f9f57af0c 100644 --- a/charts/opentelemetry-collector/templates/_pod.tpl +++ b/charts/opentelemetry-collector/templates/_pod.tpl @@ -47,6 +47,10 @@ containers: fieldRef: fieldPath: spec.nodeName {{- end }} + {{- if and (.Values.useGOMEMLIMIT) ((((.Values.resources).limits).memory)) }} + - name: GOMEMLIMIT + value: {{ div (mul (include "opentelemetry-collector.convertMemToMib" .Values.resources.limits.memory) 80) 100 }}Mi + {{- end }} {{- with .Values.extraEnvs }} {{- . | toYaml | nindent 6 }} {{- end }} diff --git a/charts/opentelemetry-collector/values.schema.json b/charts/opentelemetry-collector/values.schema.json index a169dd0a2..b65032f59 100644 --- a/charts/opentelemetry-collector/values.schema.json +++ b/charts/opentelemetry-collector/values.schema.json @@ -926,6 +926,9 @@ } } } + }, + "useGOMEMLIMIT": { + "type": "boolean" } }, "required": ["mode"] diff --git a/charts/opentelemetry-collector/values.yaml b/charts/opentelemetry-collector/values.yaml index 94fbbc0b1..a86a5ff6e 100644 --- a/charts/opentelemetry-collector/values.yaml +++ b/charts/opentelemetry-collector/values.yaml @@ -560,3 +560,11 @@ networkPolicy: # ports: # - port: 1234 # protocol: TCP + +# When enabled, the chart will set the GOMEMLIMIT env var to 80% of the configured +# resources.limits.memory and remove the memory ballast extension. +# If no resources.limits.memory are defined enabling does nothing. +# In a future release this setting will be enabled by default. +# See https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891 +# for more details. +useGOMEMLIMIT: false From 497008b0481c19d65a9dab9e20c9a2acb5db0f2d Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 08:47:38 -0600 Subject: [PATCH 2/8] remove trailing spaces --- charts/opentelemetry-collector/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/opentelemetry-collector/values.yaml b/charts/opentelemetry-collector/values.yaml index a86a5ff6e..fe61812fe 100644 --- a/charts/opentelemetry-collector/values.yaml +++ b/charts/opentelemetry-collector/values.yaml @@ -562,9 +562,9 @@ networkPolicy: # protocol: TCP # When enabled, the chart will set the GOMEMLIMIT env var to 80% of the configured -# resources.limits.memory and remove the memory ballast extension. +# resources.limits.memory and remove the memory ballast extension. # If no resources.limits.memory are defined enabling does nothing. # In a future release this setting will be enabled by default. -# See https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891 +# See https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891 # for more details. useGOMEMLIMIT: false From 281b7f3acd3ae08af04db4269af0753201a83651 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 08:49:08 -0600 Subject: [PATCH 3/8] Fix title --- charts/opentelemetry-collector/UPGRADING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/charts/opentelemetry-collector/UPGRADING.md b/charts/opentelemetry-collector/UPGRADING.md index 3b8ae864c..640e2252f 100644 --- a/charts/opentelemetry-collector/UPGRADING.md +++ b/charts/opentelemetry-collector/UPGRADING.md @@ -4,7 +4,9 @@ These upgrade guidelines only contain instructions for version upgrades which re If the version you want to upgrade to is not listed here, then there is nothing to do for you. Just upgrade and enjoy. -## something to soemthing +## Feature Flags + +### useGOMEMLIMIT A new flag, `useGOMEMLIMIT` has been added that allows specifying whether or not the chart should use the `GOMEMLIMIT` environment variable or the Memory Ballast Extension. When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` envarionment variable that is set to 80% From 2f456b988e0571a755b4af1557a6a5c1321a7189 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:21:29 -0600 Subject: [PATCH 4/8] Update charts/opentelemetry-collector/UPGRADING.md Co-authored-by: Pablo Baeyens --- charts/opentelemetry-collector/UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/opentelemetry-collector/UPGRADING.md b/charts/opentelemetry-collector/UPGRADING.md index 640e2252f..949f62ec2 100644 --- a/charts/opentelemetry-collector/UPGRADING.md +++ b/charts/opentelemetry-collector/UPGRADING.md @@ -9,7 +9,7 @@ Just upgrade and enjoy. ### useGOMEMLIMIT A new flag, `useGOMEMLIMIT` has been added that allows specifying whether or not the chart should use the `GOMEMLIMIT` environment variable or the Memory Ballast Extension. -When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` envarionment variable that is set to 80% +When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` environment variable that is set to 80% of the configures `resources.limits.memory`. If no `resources.limits.memory` are set when `useGOMEMLIMIT` is enabled then a `GOMEMLIMIT` envarionment variable WILL NOT be created but the Memory Ballast Extension will still be removed. From 8d03c751af1b7674530749fe5d1cf7775c15bb53 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:21:37 -0600 Subject: [PATCH 5/8] Update charts/opentelemetry-collector/UPGRADING.md Co-authored-by: Pablo Baeyens --- charts/opentelemetry-collector/UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/opentelemetry-collector/UPGRADING.md b/charts/opentelemetry-collector/UPGRADING.md index 949f62ec2..93474cf2b 100644 --- a/charts/opentelemetry-collector/UPGRADING.md +++ b/charts/opentelemetry-collector/UPGRADING.md @@ -10,7 +10,7 @@ Just upgrade and enjoy. A new flag, `useGOMEMLIMIT` has been added that allows specifying whether or not the chart should use the `GOMEMLIMIT` environment variable or the Memory Ballast Extension. When enabled, the chart will remove the Memory Ballast Extension from the collector's configuration AND will setup a `GOMEMLIMIT` environment variable that is set to 80% -of the configures `resources.limits.memory`. If no `resources.limits.memory` are set when `useGOMEMLIMIT` is enabled then a `GOMEMLIMIT` envarionment variable WILL NOT be +of the configured `resources.limits.memory`. If no `resources.limits.memory` are set when `useGOMEMLIMIT` is enabled then a `GOMEMLIMIT` environment variable WILL NOT be created but the Memory Ballast Extension will still be removed. If you are not interested in using `GOMEMLIMIT` then this change does not affect you. But, depending on the progress made in [Issue 891](https://github.com/open-telemetry/opentelemetry-helm-charts/issues/891), From 0b8cd05dabc7e6938c37e4cbb6bc187538954b74 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 28 Sep 2023 09:23:39 -0600 Subject: [PATCH 6/8] update warning --- charts/opentelemetry-collector/templates/NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/opentelemetry-collector/templates/NOTES.txt b/charts/opentelemetry-collector/templates/NOTES.txt index 0d96d9cee..6185e2535 100644 --- a/charts/opentelemetry-collector/templates/NOTES.txt +++ b/charts/opentelemetry-collector/templates/NOTES.txt @@ -50,5 +50,5 @@ {{ end }} {{- if and (.Values.useGOMEMLIMIT) (not ((((.Values.resources).limits).memory))) }} -[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied. It is best to use "useGOMEMLIMIT" when memory limits have been set. +[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied, which means no GOMEMLIMIT env var was configured but the Memory Ballast Extension was removed. It highly recommended to only use "useGOMEMLIMIT" when memory limits have been set. {{ end }} From 53c3e99ec6fae57227169ab4319f880ce0fa8558 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Thu, 5 Oct 2023 16:07:54 -0600 Subject: [PATCH 7/8] Cleanup merge --- charts/opentelemetry-collector/templates/NOTES.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/charts/opentelemetry-collector/templates/NOTES.txt b/charts/opentelemetry-collector/templates/NOTES.txt index 59d52b955..e36c38aee 100644 --- a/charts/opentelemetry-collector/templates/NOTES.txt +++ b/charts/opentelemetry-collector/templates/NOTES.txt @@ -31,10 +31,6 @@ [WARNING] Setting internalTrafficPolicy to 'Cluster' on Daemonset is not recommended. Consider using 'Local' instead. {{ end }} -{{- if and (eq .Values.dnsPolicy "None") (not .Values.dnsConfig) }} -{{- fail "[ERROR] dnsConfig should be provided when dnsPolicy is None" }} -{{ end }} - {{- if and (.Values.useGOMEMLIMIT) (not ((((.Values.resources).limits).memory))) }} [WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied, which means no GOMEMLIMIT env var was configured but the Memory Ballast Extension was removed. It highly recommended to only use "useGOMEMLIMIT" when memory limits have been set. {{ end }} From a9fe60d8bef8d344294fc5f85bb2283b1d05c7d3 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Fri, 6 Oct 2023 09:00:30 -0600 Subject: [PATCH 8/8] Apply suggestions from code review Co-authored-by: Jina Jain --- charts/opentelemetry-collector/templates/NOTES.txt | 2 +- charts/opentelemetry-collector/templates/_config.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/opentelemetry-collector/templates/NOTES.txt b/charts/opentelemetry-collector/templates/NOTES.txt index e36c38aee..4a3465612 100644 --- a/charts/opentelemetry-collector/templates/NOTES.txt +++ b/charts/opentelemetry-collector/templates/NOTES.txt @@ -32,7 +32,7 @@ {{ end }} {{- if and (.Values.useGOMEMLIMIT) (not ((((.Values.resources).limits).memory))) }} -[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied, which means no GOMEMLIMIT env var was configured but the Memory Ballast Extension was removed. It highly recommended to only use "useGOMEMLIMIT" when memory limits have been set. +[WARNING] "useGOMEMLIMIT" is enabled but memory limits have not been supplied, which means no GOMEMLIMIT env var was configured but the Memory Ballast Extension was removed. It is highly recommended to only use "useGOMEMLIMIT" when memory limits have been set. {{ end }} {{- if .Values.configMap.create }} diff --git a/charts/opentelemetry-collector/templates/_config.tpl b/charts/opentelemetry-collector/templates/_config.tpl index a53fb54e6..ee5ccebd3 100644 --- a/charts/opentelemetry-collector/templates/_config.tpl +++ b/charts/opentelemetry-collector/templates/_config.tpl @@ -21,7 +21,7 @@ Merge user supplied config into memory limiter config. {{- $_ := set $processorsConfig "memory_limiter" (include "opentelemetry-collector.memoryLimiter" . | fromYaml) }} {{- end }} -{{- if and .Values.useGOMEMLIMIT }} +{{- if .Values.useGOMEMLIMIT }} {{- if (((.Values.config).service).extensions) }} {{- $_ := set .Values.config.service "extensions" (without .Values.config.service.extensions "memory_ballast") }} {{- end}}