diff --git a/charts/opentelemetry-collector/Chart.yaml b/charts/opentelemetry-collector/Chart.yaml index d402bae1f..af760f8d1 100644 --- a/charts/opentelemetry-collector/Chart.yaml +++ b/charts/opentelemetry-collector/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-collector -version: 0.70.0 +version: 0.71.1 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 017689950..6a3a7e778 100644 --- a/charts/opentelemetry-collector/UPGRADING.md +++ b/charts/opentelemetry-collector/UPGRADING.md @@ -4,6 +4,18 @@ 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. +## 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` environment variable that is set to 80% +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), +the use of `GOMEMLIMIT` may completely replace the Memory Ballast Extension in the future. + ## 0.69.3 to 0.70.0 The following deprecated fields have been removed. Please use the new values: 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 0ea64b7f4..6cd64b667 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 4ae1c9f2b..efff965d0 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 ccf93a663..496190e03 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: ccab9d99705eed0434bb4ffcd924aa81b3622af921df46de739520808aff3246 + checksum/config: 0925736e49af0a9622a7dbac1f6a7cfefb41568951f9d538dc2876db994794b6 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 671145023..7cb30346b 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: 24b5ef86a727e5f75d401c67bee702751bbfff70f16cf50abac1de7d0cbe2873 + checksum/config: 0487773e701692d5a8ce17bcb985b307798a2a352c0f16fa9cac69132a39b699 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 0e850917d..3c2ab08bf 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 b303cd83d..a83e5847d 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 6cea5d925..b0d0845d1 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 73a39e4f304375d3b9e068d5c81234b4516fb1de436ef2543cb1f1f44767f477 + checksum/config: 29fd265117703fb86fe76696245e4c534e3c72bb9209007fe85dca600a0c0ba8 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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 41b0b53a9..2c1a14619 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-hostmetrics/rendered/daemonset.yaml index db8a4de51..910b2b670 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: cde6c4571da1a1b8e9efa472a125615a0d02751b0b71e0ceabcf8423b881656e + checksum/config: 9c743c8c2d54b656a046b0381d4389f311bc6fcd785304f9c3312ca3576f726e 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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 d86ef1d86..365c725d3 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 3d60f445c..45d53d249 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 2309aae86d18f4d766dee4f7c66dc18a33d5cee1f2a20ff4d9b1a7f1d8e06b18 + checksum/config: e15e824776ad088bd583897dda0acf0f45b964bf403bd17595983084dc88528d 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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 d86ef1d86..365c725d3 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml b/charts/opentelemetry-collector/examples/daemonset-only/rendered/daemonset.yaml index 35526387c..d921feba7 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -22,7 +22,7 @@ spec: template: metadata: annotations: - checksum/config: 2309aae86d18f4d766dee4f7c66dc18a33d5cee1f2a20ff4d9b1a7f1d8e06b18 + checksum/config: e15e824776ad088bd583897dda0acf0f45b964bf403bd17595983084dc88528d 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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/configmap.yaml index 4ae1c9f2b..efff965d0 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/deployment.yaml index 18fe96225..0c91454b2 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: 24b5ef86a727e5f75d401c67bee702751bbfff70f16cf50abac1de7d0cbe2873 + checksum/config: 0487773e701692d5a8ce17bcb985b307798a2a352c0f16fa9cac69132a39b699 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 0e850917d..3c2ab08bf 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/deployment-only/rendered/serviceaccount.yaml index 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 8cb120321..5ad5803f5 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 2ff14b66b..1a1571144 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: a870cb9fafbd2b89ea7d94d1ba82beabb19266ea8cc59e7d07d18f9fef1e68ae + checksum/config: ed25265b11946d631b58250e3bc0da83140b632222a76dc753c59a2a5b271f9d 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 230c96589..bc1e2e85c 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 56a1decdc..9ae435c46 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 0e850917d..3c2ab08bf 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrole.yaml index 0d2002190..6488494a3 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/clusterrolebinding.yaml index 5a757502f..cd2f86a06 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/configmap.yaml index 625c4b1b2..ccc6cb4d9 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/deployment.yaml index 7d0f022c0..8cf2481a6 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -24,7 +24,7 @@ spec: template: metadata: annotations: - checksum/config: ab42dfd87bc2e0501b0c739c20dbd1bb5f7d308caedef4f8fd42da9eace31248 + checksum/config: dc4a7e8f4599ebcb1a6d21e6423abb8a3c298fc1d1d3496b111233714160003f 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 0e850917d..3c2ab08bf 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/kubernetesAttributes/rendered/serviceaccount.yaml index 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.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 3c46f9b98..7772fd277 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/service.yaml index 4cd3921c0..b2ef665ba 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/serviceaccount.yaml index 26dc5db54..c9b6c48fe 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" diff --git a/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml b/charts/opentelemetry-collector/examples/statefulset-only/rendered/statefulset.yaml index 763c2a365..715802389 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.70.0 + helm.sh/chart: opentelemetry-collector-0.71.1 app.kubernetes.io/name: opentelemetry-collector app.kubernetes.io/instance: example app.kubernetes.io/version: "0.86.0" @@ -25,7 +25,7 @@ spec: template: metadata: annotations: - checksum/config: a8993a6c320e9994f1e7ce6fc85cafc0ff0f07927397bbd01d9be97bda935378 + checksum/config: a980b4d58d3af17ec8634f22118ddf8385462227c3c4ac5bd8d9a1f239c743c4 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..ae1142b28 --- /dev/null +++ b/charts/opentelemetry-collector/examples/using-GOMEMLIMIT/rendered/configmap.yaml @@ -0,0 +1,85 @@ +--- +# Source: opentelemetry-collector/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-opentelemetry-collector + namespace: default + labels: + helm.sh/chart: opentelemetry-collector-0.71.1 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.86.0" + app.kubernetes.io/managed-by: Helm +data: + relay: | + exporters: + debug: {} + 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: + - debug + processors: + - memory_limiter + - batch + receivers: + - otlp + metrics: + exporters: + - debug + processors: + - memory_limiter + - batch + receivers: + - otlp + - prometheus + traces: + exporters: + - debug + 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..ef6acfc5d --- /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.71.1 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.86.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: 0607a429bfee51aa8a7383b2ccfe6b5ef13838fe616d18769bce3b926e4fc34e + + 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.86.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: 156MiB + 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..3c2ab08bf --- /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.71.1 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.86.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..c9b6c48fe --- /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.71.1 + app.kubernetes.io/name: opentelemetry-collector + app.kubernetes.io/instance: example + app.kubernetes.io/version: "0.86.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 bdb572d75..4a3465612 100644 --- a/charts/opentelemetry-collector/templates/NOTES.txt +++ b/charts/opentelemetry-collector/templates/NOTES.txt @@ -31,6 +31,10 @@ [WARNING] Setting internalTrafficPolicy to 'Cluster' on Daemonset is not recommended. Consider using 'Local' instead. {{ 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 is highly recommended to only use "useGOMEMLIMIT" when memory limits have been set. +{{ end }} + {{- if .Values.configMap.create }} {{- range $key, $value := (((.Values.config).service).pipelines) }} {{- if has "logging" ($value.exporters) }} diff --git a/charts/opentelemetry-collector/templates/_config.tpl b/charts/opentelemetry-collector/templates/_config.tpl index d5a5ffef7..ee5ccebd3 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 .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 f4a755450..32329ade7 100644 --- a/charts/opentelemetry-collector/templates/_helpers.tpl +++ b/charts/opentelemetry-collector/templates/_helpers.tpl @@ -155,3 +155,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 1237b23a7..0a6da5c27 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 }}MiB + {{- 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 bcccfffa1..3bc0b0e2d 100644 --- a/charts/opentelemetry-collector/values.schema.json +++ b/charts/opentelemetry-collector/values.schema.json @@ -899,6 +899,9 @@ } } } + }, + "useGOMEMLIMIT": { + "type": "boolean" } }, "required": ["mode"] diff --git a/charts/opentelemetry-collector/values.yaml b/charts/opentelemetry-collector/values.yaml index 0d493c766..96c6fd2f2 100644 --- a/charts/opentelemetry-collector/values.yaml +++ b/charts/opentelemetry-collector/values.yaml @@ -563,3 +563,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 diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index 324339f2d..9c0bee4d7 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.39.1 +version: 0.39.2 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 7089f587c..8b107f2ad 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 63142f09b..bc2758f4c 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 ba524ed6c..7e1666d84 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 d704c38d8..ba987efd3 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 343aa1839..b1bae29db 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 bdc6c8af8..dd9656a94 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 cc8358db4..4d3d22d21 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 5eec6093b..ea6cd98c1 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -31,7 +31,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 509fb4ec7..74871d41a 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 0979a9ba5..aaba4141c 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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 cfb6c6779..1c8b41cff 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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.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.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml index 622f8840c..f60b10f89 100644 --- a/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml @@ -30,4 +30,13 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml b/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml index ac6a560b6..203eb4321 100644 --- a/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml @@ -31,6 +31,15 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} {{- end }} --- apiVersion: v1 @@ -64,3 +73,13 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} +