From 8b1494a73fa484f4ddab92a6d405b9e7ddf0057b Mon Sep 17 00:00:00 2001 From: Jaganathan P <156800415+jagan2221@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:45:56 +0530 Subject: [PATCH] Pull master branch (#3842) * feat: Add labels to setup Pods for easy logs collection (#3817) * Add labels to setup Pods for easy logs collection * Addressing comments * remove unwanted line * Addressing reviews and fixing bugs * Fixing name and indent * Fix test * Removing the extra space * Changed events to setup * feat(metrics): Define allowlist for histogram metrics (#3821) * feat(metrics): Define allowlist for histogram metrics * Adding template and integration tests * Removed KOPs 1.30, not supported yet (#3823) * docs(histogram-metrics): Updates to the doc around allowing histogram metrics (#3824) * chore: Upgrade OpenTelemetry Collector to 0.104.0-sumo-1 (#3829) * chore: update OpenTelemetry Collector to 0.104.0-sumo-1 * Remove deprecated compress_encoding to use compression * Change the bind address for the otel collector and the health check ext to the pod IP * Regenerate test files after changes to bind IP address configuration across all pods * Add otel collector labels to metrics collection * fix(metrics): Correct the name of k8s hpa metrics (part of kube-state-metrics) (#3832) * chore: Prepare release 4.10.0 (#3834) * feat: Add support for the Korea region of the Sumologic deployment (#3835) --------- Co-authored-by: Harsh Shah <169750016+harshshahsumo@users.noreply.github.com> Co-authored-by: Raj Nishtala <113392743+rnishtala-sumo@users.noreply.github.com> Co-authored-by: Tim --- .changelog/3795.changed.txt | 1 - .changelog/3796.fixed.txt | 1 - .changelog/3802.changed.txt | 1 - .changelog/3803.changed.txt | 1 - .changelog/3804.changed.1.txt | 1 - .changelog/3804.changed.2.txt | 1 - .changelog/3804.changed.3.txt | 1 - .changelog/3804.changed.4.txt | 1 - .changelog/3804.changed.5.txt | 1 - .changelog/3808.changed.txt | 1 - .changelog/3818.changed.txt | 1 - CHANGELOG.md | 41 +++ README.md | 3 +- deploy/helm/sumologic/Chart.yaml | 4 +- deploy/helm/sumologic/README.md | 5 +- .../sumologic/conf/events/otelcol/config.yaml | 3 +- .../otelcol.instrumentation.conf.yaml | 23 +- .../instrumentation/traces.gateway.conf.yaml | 7 +- .../instrumentation/traces.sampler.conf.yaml | 7 +- .../logs/collector/otelcloudwatch/config.yaml | 3 +- .../conf/logs/collector/otelcol/config.yaml | 3 +- .../collector/otellogswindows/config.yaml | 3 +- .../sumologic/conf/logs/otelcol/config.yaml | 3 +- .../metrics/collector/otelcol/config.yaml | 7 +- .../conf/metrics/otelcol/config.yaml | 5 +- .../conf/metrics/otelcol/processors.yaml | 2 +- deploy/helm/sumologic/conf/setup/monitors.sh | 2 +- deploy/helm/sumologic/conf/setup/setup.sh | 2 +- .../sumologic/templates/_helpers/_common.tpl | 12 + .../templates/events/otelcol/statefulset.yaml | 1 + .../otelcol-instrumentation/statefulset.yaml | 1 + .../traces-gateway/deployment.yaml | 1 + .../traces-sampler/deployment.yaml | 1 + .../otelcol-cloudwatch/statefulset.yaml | 1 + .../logs/collector/otelcol/daemonset.yaml | 1 + .../collector/otellogswindows/daemonset.yaml | 1 + .../templates/logs/otelcol/statefulset.yaml | 1 + .../otelcol/opentelemetrycollector.yaml | 5 + .../metrics/otelcol/statefulset.yaml | 1 + .../helm/sumologic/templates/setup/job.yaml | 2 + deploy/helm/sumologic/values.yaml | 19 +- docs/README.md | 4 +- docs/filtering.md | 12 + docs/scraped-metrics.md | 264 ++++++++---------- .../goldenfile/events_otc/basic.output.yaml | 3 +- .../goldenfile/events_otc/options.output.yaml | 3 +- .../events_otc/sumologic-mock.output.yaml | 3 +- .../events_otc_statefulset/basic.output.yaml | 7 +- .../events_otc_statefulset/common.output.yaml | 7 +- .../events_otc_statefulset/custom.output.yaml | 5 + .../events_otc_statefulset/proxy.output.yaml | 7 +- .../goldenfile/logs_otc/basic.output.yaml | 3 +- .../goldenfile/logs_otc/debug.output.yaml | 3 +- .../goldenfile/logs_otc/options.output.yaml | 3 +- .../logs_otc_cloudwatch/basic.output.yaml | 7 +- .../logs_otc_cloudwatch/custom.output.yaml | 5 + .../additional-complex.output.yaml | 7 +- .../logs_otc_daemonset/additional.output.yaml | 7 +- .../logs_otc_daemonset/basic.output.yaml | 7 +- .../logs_otc_daemonset/complex.output.yaml | 5 + .../multiple_multiline.output.yaml | 3 +- .../configmap/basic.output.yaml | 3 +- .../configmap/debug.output.yaml | 3 +- .../configmap/options.output.yaml | 3 +- .../daemonset/additional-complex.output.yaml | 7 +- .../daemonset/additional.output.yaml | 7 +- .../daemonset/basic.output.yaml | 7 +- .../daemonset/complex.output.yaml | 5 + .../daemonset/multiple_multiline.output.yaml | 3 +- .../metadata_logs_otc/debug.output.yaml | 5 +- .../debug_with_sumologic_mock.output.yaml | 5 +- ...debug_with_sumologic_mock_http.output.yaml | 5 +- .../extra_exporter.output.yaml | 5 +- .../metadata_logs_otc/otel.output.yaml | 5 +- .../metadata_logs_otc/routing.output.yaml | 5 +- .../routing_with_defaults.output.yaml | 5 +- .../routing_with_defaults_http.output.yaml | 5 +- .../metadata_logs_otc/templates.output.yaml | 5 +- .../basic.output.yaml | 7 +- .../custom.output.yaml | 5 + .../additional_endpoints.output.yaml | 10 +- .../allow_histograms.input.yaml | 3 + .../allow_histograms.output.yaml | 205 ++++++++++++++ .../metadata_metrics_otc/basic.output.yaml | 10 +- .../metadata_metrics_otc/custom.output.yaml | 10 +- .../metadata_metrics_otc/debug.output.yaml | 10 +- .../debug_with_sumologic_mock.output.yaml | 10 +- ...debug_with_sumologic_mock_http.output.yaml | 10 +- .../filtered_app_metrics.output.yaml | 10 +- .../basic.output.yaml | 7 +- .../custom.output.yaml | 5 + .../metrics_collector_otc/basic.output.yaml | 18 +- .../metrics_collector_otc/custom.output.yaml | 8 +- .../metrics_collector_otc/debug.output.yaml | 18 +- .../metrics_collector_otc/kubelet.output.yaml | 18 +- .../config-from-merge.output.yaml | 23 +- ...-values-backward-compatibility.output.yaml | 20 +- .../traces-gateway-disabled.output.yaml | 23 +- ...ateway-disabled.sumologic-mock.output.yaml | 23 +- .../traces-gateway-enabled.output.yaml | 23 +- ...gateway-enabled.sumologic-mock.output.yaml | 23 +- .../basic.output.yaml | 8 +- .../custom.output.yaml | 6 + .../goldenfile/setup/basic.output.yaml | 2 + ...itors_with_email_notifications.output.yaml | 2 + .../monitors_with_single_email.output.yaml | 2 + .../sumologic-mock-no-secret.output.yaml | 2 + .../setup/sumologic-mock.output.yaml | 2 + .../terraform/all_fields.output.yaml | 4 +- .../terraform/collector_fields.output.yaml | 4 +- .../terraform/conditional_sources.output.yaml | 4 +- .../goldenfile/terraform/custom.output.yaml | 4 +- .../goldenfile/terraform/default.output.yaml | 4 +- .../disable_default_metrics.output.yaml | 4 +- .../terraform/disabled_dashboards.output.yaml | 4 +- .../terraform/disabled_monitors.output.yaml | 4 +- .../terraform/logs_fields.output.yaml | 4 +- ...itors_with_email_notifications.output.yaml | 4 +- .../monitors_with_single_email.output.yaml | 4 +- .../terraform/strip_extrapolation.output.yaml | 4 +- .../goldenfile/terraform/traces.output.yaml | 4 +- .../tracing-metrics-disabled.output.yaml | 4 +- .../basic.output.yaml | 7 +- .../custom.output.yaml | 5 + .../config-from-merge.output.yaml | 7 +- ...-values-backward-compatibility.output.yaml | 8 +- .../sumologic-mock.output.yaml | 7 +- .../traces-gateway-true.output.yaml | 7 +- .../basic.output.yaml | 7 +- .../custom.output.yaml | 5 + .../persistence-enabled.output.yaml | 7 +- .../config-from-merge.output.yaml | 7 +- ...-values-backward-compatibility.output.yaml | 8 +- .../traces-sampler/httpendpoint.output.yaml | 7 +- .../persistence-enabled.output.yaml | 7 +- .../traces-sampler/simple.output.yaml | 7 +- .../traces-sampler/sumologic-mock.output.yaml | 7 +- tests/integration/features.go | 6 +- tests/integration/helm_ot_histograms_test.go | 47 ++++ tests/integration/internal/constants.go | 10 + .../values/values_helm_ot_histograms.yaml | 3 + 141 files changed, 948 insertions(+), 429 deletions(-) delete mode 100644 .changelog/3795.changed.txt delete mode 100644 .changelog/3796.fixed.txt delete mode 100644 .changelog/3802.changed.txt delete mode 100644 .changelog/3803.changed.txt delete mode 100644 .changelog/3804.changed.1.txt delete mode 100644 .changelog/3804.changed.2.txt delete mode 100644 .changelog/3804.changed.3.txt delete mode 100644 .changelog/3804.changed.4.txt delete mode 100644 .changelog/3804.changed.5.txt delete mode 100644 .changelog/3808.changed.txt delete mode 100644 .changelog/3818.changed.txt create mode 100644 tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.input.yaml create mode 100644 tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.output.yaml create mode 100644 tests/integration/helm_ot_histograms_test.go create mode 100644 tests/integration/values/values_helm_ot_histograms.yaml diff --git a/.changelog/3795.changed.txt b/.changelog/3795.changed.txt deleted file mode 100644 index 51b5116fc8..0000000000 --- a/.changelog/3795.changed.txt +++ /dev/null @@ -1 +0,0 @@ -test: Added custom pod label tests for global configuration attributes \ No newline at end of file diff --git a/.changelog/3796.fixed.txt b/.changelog/3796.fixed.txt deleted file mode 100644 index adf9198db7..0000000000 --- a/.changelog/3796.fixed.txt +++ /dev/null @@ -1 +0,0 @@ -fix(logs): do not add exporters mutliple times to the pipeline \ No newline at end of file diff --git a/.changelog/3802.changed.txt b/.changelog/3802.changed.txt deleted file mode 100644 index ade31bf755..0000000000 --- a/.changelog/3802.changed.txt +++ /dev/null @@ -1 +0,0 @@ -test: Added custom pod annotation tests for global configuration attributes \ No newline at end of file diff --git a/.changelog/3803.changed.txt b/.changelog/3803.changed.txt deleted file mode 100644 index e22c905c98..0000000000 --- a/.changelog/3803.changed.txt +++ /dev/null @@ -1 +0,0 @@ -test: Added custom service account annotation tests for global configuration attributes \ No newline at end of file diff --git a/.changelog/3804.changed.1.txt b/.changelog/3804.changed.1.txt deleted file mode 100644 index 8f2f82d73f..0000000000 --- a/.changelog/3804.changed.1.txt +++ /dev/null @@ -1 +0,0 @@ -feat: add support for kubernetes 1.30 for EKS \ No newline at end of file diff --git a/.changelog/3804.changed.2.txt b/.changelog/3804.changed.2.txt deleted file mode 100644 index 4d63a891c8..0000000000 --- a/.changelog/3804.changed.2.txt +++ /dev/null @@ -1 +0,0 @@ -feat: add support for kubernetes 1.30 for KOPS \ No newline at end of file diff --git a/.changelog/3804.changed.3.txt b/.changelog/3804.changed.3.txt deleted file mode 100644 index 34b77d4368..0000000000 --- a/.changelog/3804.changed.3.txt +++ /dev/null @@ -1 +0,0 @@ -feat: add support for kubernetes 1.30 for GKE \ No newline at end of file diff --git a/.changelog/3804.changed.4.txt b/.changelog/3804.changed.4.txt deleted file mode 100644 index 709e3f88aa..0000000000 --- a/.changelog/3804.changed.4.txt +++ /dev/null @@ -1 +0,0 @@ -feat: add support for kubernetes 1.30 for AKS \ No newline at end of file diff --git a/.changelog/3804.changed.5.txt b/.changelog/3804.changed.5.txt deleted file mode 100644 index f2f62373d4..0000000000 --- a/.changelog/3804.changed.5.txt +++ /dev/null @@ -1 +0,0 @@ -feat: add support for kubernetes 4.16 for OpenShift \ No newline at end of file diff --git a/.changelog/3808.changed.txt b/.changelog/3808.changed.txt deleted file mode 100644 index 0ca38c8a28..0000000000 --- a/.changelog/3808.changed.txt +++ /dev/null @@ -1 +0,0 @@ -test: Added custom image pull secrets tests for global configuration attributes \ No newline at end of file diff --git a/.changelog/3818.changed.txt b/.changelog/3818.changed.txt deleted file mode 100644 index 21460fde5e..0000000000 --- a/.changelog/3818.changed.txt +++ /dev/null @@ -1 +0,0 @@ -feat: do not send any histogram or summary metric \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b74a1afa14..e0887c27e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,47 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +## [v4.10.0] + +### Released 2024-08-23 + +### Breaking Changes + +- feat: Do not send any histogram or summary metric [#3818] + +### Added + +- feat(metrics): Define allowlist for histogram metrics [#3821] + +### Changed + +- feat: Add support for custom pod label as global configuration [#3795] +- feat: Add support for custom pod annotation as global configuration [#3802] +- feat: Add support for custom service account annotation as global configuration [#3803] +- feat: add support for kubernetes 1.30 for GKE [#3804] +- feat: add support for kubernetes 1.30 for EKS [#3804] +- feat: add support for kubernetes 1.30 for AKS [#3804] +- feat: add support for kubernetes 4.16 for OpenShift [#3804] +- feat: Add support for custom image pull secrets tests as global configuration [#3808] +- chore: update OpenTelemetry Collector to 0.104.0-sumo-1 [#3829] + +### Fixed + +- fix(logs): do not add exporters mutliple times to the pipeline [#3796] +- fix(metrics): Correct the name of k8s hpa metrics (part of kube-state-metrics) [#3832] + +[#3821]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3821 +[#3795]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3795 +[#3802]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3802 +[#3803]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3803 +[#3804]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3804 +[#3808]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3808 +[#3818]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3818 +[#3829]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3829 +[#3796]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3796 +[#3832]: https://github.com/SumoLogic/sumologic-kubernetes-collection/pull/3832 +[v4.10.0]: https://github.com/SumoLogic/sumologic-kubernetes-collection/releases/v4.10.0 + ## [v4.9.0] ### Released 2024-07-01 diff --git a/README.md b/README.md index a3ab5d9ded..34bd7a3b10 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,8 @@ release. | version | planned end of life date | | ------------------------------------------------------------------------------------------------------- | ------------------------ | -| [v4.9](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.9/docs/README.md) | TBA | +| [v4.10](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.10/docs/README.md) | TBD | +| [v4.9](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.9/docs/README.md) | 2025-07-01 | | [v4.8](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.8/docs/README.md) | 2025-01-01 | | [v4.7](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.7/docs/README.md) | 2024-12-07 | | [v4.6](https://github.com/SumoLogic/sumologic-kubernetes-collection/tree/release-v4.6/docs/README.md) | 2024-10-10 | diff --git a/deploy/helm/sumologic/Chart.yaml b/deploy/helm/sumologic/Chart.yaml index 30aa3b2bcb..eec3a9aaf7 100644 --- a/deploy/helm/sumologic/Chart.yaml +++ b/deploy/helm/sumologic/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: sumologic -version: 4.9.0 -appVersion: 4.9.0 +version: 4.10.0 +appVersion: 4.10.0 description: A Helm chart for collecting Kubernetes logs, metrics, traces and events into Sumo Logic. type: application keywords: diff --git a/deploy/helm/sumologic/README.md b/deploy/helm/sumologic/README.md index 538d685ca8..498e8d60fa 100644 --- a/deploy/helm/sumologic/README.md +++ b/deploy/helm/sumologic/README.md @@ -149,6 +149,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.metrics.collector.otelcol.config.override` | Configuration for otelcol metrics collector, replaces defaults. See also https://github.com/SumoLogic/sumologic-otel-collector/blob/main/docs/configuration.md. | {} | | `sumologic.metrics.collector.otelcol.targetAllocator.resources` | Resource requests and limits for Metrics Collector Target Allocator. | {} | | `sumologic.metrics.dropHistogramBuckets` | Drop buckets from histogram and summary metrics, leaving only the sum and count components. | `true` | +| `sumologic.metrics.allowHistogramRegex` | Allowlist for Histogram metrics, including the buckets | `"^$"` | | `sumologic.metrics.sourceType` | The type of the Sumo Logic source being used for metrics ingestion. Can be `http` or `otlp`. | `otlp` | | `sumologic.traces.enabled` | Set the enabled flag to true to enable tracing ingestion. _Tracing must be enabled for the account first. Please contact your Sumo representative for activation details_ | `true` | | `sumologic.traces.spans_per_request` | Maximum number of spans sent in single batch | `100` | @@ -169,7 +170,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `sumologic.noProxy` | List of comma separated hostnames which should be excluded from the proxy | `kubernetes.default.svc` | | `sumologic.pullSecrets` | Optional list of secrets that will be used for pulling images for Sumo Logic's deployments and statefulsets. | `Nil` | | `sumologic.otelcolImage.repository` | Default image repository for OpenTelemetry Collector. This can be overridden for specific components. | `public.ecr.aws/sumologic/sumologic-otel-collector` | -| `sumologic.otelcolImage.tag` | Default image tag for OpenTelemetry Collector. This can be overridden for specific components. | `0.102.1-sumo-0` | +| `sumologic.otelcolImage.tag` | Default image tag for OpenTelemetry Collector. This can be overridden for specific components. | `0.104.0-sumo-1` | | `sumologic.otelcolImage.addFipsSuffix` | Add a `-fips` suffix to all image tags. See [help.sumologic.com/docs/send-data/kubernetes/security-best-practices](https://help.sumologic.com/docs/send-data/kubernetes/security-best-practices/) for more information. | `false` | | `sumologic.podLabels` | Additional labels for the pods. | `{}` | | `sumologic.podAnnotations` | Additional annotations for the pods. | `{}` | @@ -322,7 +323,7 @@ The following table lists the configurable parameters of the Sumo Logic chart an | `opentelemetry-operator.manager.autoInstrumentationImage.nodejs.tag` | OpenTelemetry Operator NodeJS Instrumentation image tag. | `0.40.0` | | `opentelemetry-operator.manager.image.repository` | The default operator image repository for OpenTelemetry. | `public.ecr.aws/sumologic/opentelemetry-operator` | | `opentelemetry-operator.manager.collectorImage.repository` | The default collector image repository for OpenTelemetryCollector CRDs. | `public.ecr.aws/sumologic/sumologic-otel-collector` | -| `opentelemetry-operator.manager.collectorImage.tag` | The default collector image tag for OpenTelemetryCollector CRDs. | `0.102.1-sumo-0` | +| `opentelemetry-operator.manager.collectorImage.tag` | The default collector image tag for OpenTelemetryCollector CRDs. | `0.104.0-sumo-1` | | `opentelemetry-operator.manager.resources.limits.cpu` | Used to set limit CPU for OpenTelemetry-Operator Manager. | `250m` | | `opentelemetry-operator.manager.resources.limits.memory` | Used to set limit Memory for OpenTelemetry-Operator Manager. | `512Mi` | | `opentelemetry-operator.manager.resources.requests.cpu` | Used to set requested CPU for OpenTelemetry-Operator Manager. | `150m` | diff --git a/deploy/helm/sumologic/conf/events/otelcol/config.yaml b/deploy/helm/sumologic/conf/events/otelcol/config.yaml index 545be3a0bb..6f121be9c3 100644 --- a/deploy/helm/sumologic/conf/events/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/events/otelcol/config.yaml @@ -29,7 +29,8 @@ extensions: directory: {{ .Values.sumologic.events.persistence.persistentVolume.path }} timeout: 10s {{- end }} - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: diff --git a/deploy/helm/sumologic/conf/instrumentation/otelcol.instrumentation.conf.yaml b/deploy/helm/sumologic/conf/instrumentation/otelcol.instrumentation.conf.yaml index fe013cb249..25a2e6ee4f 100644 --- a/deploy/helm/sumologic/conf/instrumentation/otelcol.instrumentation.conf.yaml +++ b/deploy/helm/sumologic/conf/instrumentation/otelcol.instrumentation.conf.yaml @@ -12,7 +12,7 @@ exporters: endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} ## Compression encoding format, either empty string (""), gzip or deflate (default gzip). ## Empty string means no compression - compress_encoding: gzip + compression: gzip ## Max HTTP request body size in bytes before compression (if applied). By default 1_048_576 (1MB) is used. max_request_body_size: 1_048_576 # 1MB ## Format to use when sending logs to Sumo. (default json) (possible values: json, text) @@ -62,27 +62,27 @@ receivers: jaeger: protocols: thrift_compact: - endpoint: "0.0.0.0:6831" + endpoint: "${env:MY_POD_IP}:6831" thrift_binary: - endpoint: "0.0.0.0:6832" + endpoint: "${env:MY_POD_IP}:6832" grpc: - endpoint: "0.0.0.0:14250" + endpoint: "${env:MY_POD_IP}:14250" thrift_http: - endpoint: "0.0.0.0:14268" + endpoint: "${env:MY_POD_IP}:14268" opencensus: - endpoint: "0.0.0.0:55678" + endpoint: "${env:MY_POD_IP}:55678" otlp: protocols: grpc: - endpoint: "0.0.0.0:4317" + endpoint: "${env:MY_POD_IP}:4317" http: - endpoint: "0.0.0.0:4318" + endpoint: "${env:MY_POD_IP}:4318" otlp/deprecated: protocols: http: - endpoint: "0.0.0.0:55681" + endpoint: "${env:MY_POD_IP}:55681" zipkin: - endpoint: "0.0.0.0:9411" + endpoint: "${env:MY_POD_IP}:9411" processors: ## Source processor adds Sumo Logic related metadata @@ -173,7 +173,8 @@ processors: ## Time duration after which a batch will be sent regardless of size timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: ## Memory Ballast size should be max 1/3 to 1/2 of memory. size_mib: 512 diff --git a/deploy/helm/sumologic/conf/instrumentation/traces.gateway.conf.yaml b/deploy/helm/sumologic/conf/instrumentation/traces.gateway.conf.yaml index 5907d37681..9287434854 100644 --- a/deploy/helm/sumologic/conf/instrumentation/traces.gateway.conf.yaml +++ b/deploy/helm/sumologic/conf/instrumentation/traces.gateway.conf.yaml @@ -24,9 +24,9 @@ receivers: otlp: protocols: grpc: - endpoint: "0.0.0.0:4317" + endpoint: "${env:MY_POD_IP}:4317" http: - endpoint: "0.0.0.0:4318" + endpoint: "${env:MY_POD_IP}:4318" processors: ## The memory_limiter processor is used to prevent out of memory situations on the collector. memory_limiter: @@ -55,7 +55,8 @@ processors: ## Never more than this many spans are being sent in a batch # send_batch_max_size: 512 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: ## Memory Ballast size should be max 1/3 to 1/2 of memory. size_mib: 512 diff --git a/deploy/helm/sumologic/conf/instrumentation/traces.sampler.conf.yaml b/deploy/helm/sumologic/conf/instrumentation/traces.sampler.conf.yaml index 83a68cc104..d342cf9e9b 100644 --- a/deploy/helm/sumologic/conf/instrumentation/traces.sampler.conf.yaml +++ b/deploy/helm/sumologic/conf/instrumentation/traces.sampler.conf.yaml @@ -33,9 +33,9 @@ receivers: otlp: protocols: grpc: - endpoint: "0.0.0.0:4317" + endpoint: "${env:MY_POD_IP}:4317" http: - endpoint: "0.0.0.0:4318" + endpoint: "${env:MY_POD_IP}:4318" processors: ## The memory_limiter processor is used to prevent out of memory situations on the collector. memory_limiter: @@ -70,7 +70,8 @@ processors: timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 {{- if .Values.tracesSampler.persistence.enabled }} ## Configuration for File Storage extension file_storage: diff --git a/deploy/helm/sumologic/conf/logs/collector/otelcloudwatch/config.yaml b/deploy/helm/sumologic/conf/logs/collector/otelcloudwatch/config.yaml index f3c5cf64b8..ed08e8212c 100644 --- a/deploy/helm/sumologic/conf/logs/collector/otelcloudwatch/config.yaml +++ b/deploy/helm/sumologic/conf/logs/collector/otelcloudwatch/config.yaml @@ -15,7 +15,8 @@ extensions: directory: /var/lib/storage/otc timeout: 10s {{ end }} - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: diff --git a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml index 388adca2eb..72b210426d 100644 --- a/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/logs/collector/otelcol/config.yaml @@ -17,7 +17,8 @@ extensions: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: diff --git a/deploy/helm/sumologic/conf/logs/collector/otellogswindows/config.yaml b/deploy/helm/sumologic/conf/logs/collector/otellogswindows/config.yaml index 1bf42d8e18..d664dc6305 100644 --- a/deploy/helm/sumologic/conf/logs/collector/otellogswindows/config.yaml +++ b/deploy/helm/sumologic/conf/logs/collector/otellogswindows/config.yaml @@ -17,7 +17,8 @@ extensions: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: diff --git a/deploy/helm/sumologic/conf/logs/otelcol/config.yaml b/deploy/helm/sumologic/conf/logs/otelcol/config.yaml index b273de4bae..21d5ddb009 100644 --- a/deploy/helm/sumologic/conf/logs/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/logs/otelcol/config.yaml @@ -95,7 +95,8 @@ exporters: {{- end }} extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 {{ if .Values.metadata.persistence.enabled }} ## Configuration for File Storage extension file_storage: diff --git a/deploy/helm/sumologic/conf/metrics/collector/otelcol/config.yaml b/deploy/helm/sumologic/conf/metrics/collector/otelcol/config.yaml index f33c562462..b4b7622fde 100644 --- a/deploy/helm/sumologic/conf/metrics/collector/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/metrics/collector/otelcol/config.yaml @@ -15,7 +15,8 @@ exporters: disable_keep_alives: true extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} file_storage: directory: /var/lib/storage/otc @@ -57,8 +58,8 @@ processors: metric_statements: - context: metric statements: - - extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY - - extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + - extract_sum_metric(true) where (not IsMatch(name, {{ .Values.sumologic.metrics.allowHistogramRegex | quote }})) and (type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) + - extract_count_metric(true) where (not IsMatch(name, {{ .Values.sumologic.metrics.allowHistogramRegex | quote }})) and (type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) {{- end }} receivers: diff --git a/deploy/helm/sumologic/conf/metrics/otelcol/config.yaml b/deploy/helm/sumologic/conf/metrics/otelcol/config.yaml index fdce4035c3..7e2d89bba1 100644 --- a/deploy/helm/sumologic/conf/metrics/otelcol/config.yaml +++ b/deploy/helm/sumologic/conf/metrics/otelcol/config.yaml @@ -11,7 +11,8 @@ extensions: directory: /var/lib/storage/otc timeout: 10s {{ end }} - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: @@ -40,7 +41,7 @@ receivers: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: diff --git a/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml b/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml index f72d8c0a07..50e49bf51e 100644 --- a/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml +++ b/deploy/helm/sumologic/conf/metrics/otelcol/processors.yaml @@ -16,7 +16,7 @@ filter/drop_unnecessary_metrics: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") {{- if .Values.sumologic.metrics.dropHistogramBuckets }} # drop histograms we've extracted sums and counts from, but don't want the full thing - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, {{ .Values.sumologic.metrics.allowHistogramRegex | quote }})) and (type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")) {{- end }} # Prometheus receiver puts all labels in record-level attributes, and we need them in resource diff --git a/deploy/helm/sumologic/conf/setup/monitors.sh b/deploy/helm/sumologic/conf/setup/monitors.sh index c0a62cd862..0f4899f9b6 100644 --- a/deploy/helm/sumologic/conf/setup/monitors.sh +++ b/deploy/helm/sumologic/conf/setup/monitors.sh @@ -65,7 +65,7 @@ if [[ -z "${MONITORS_FOLDER_ID}" ]]; then # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi diff --git a/deploy/helm/sumologic/conf/setup/setup.sh b/deploy/helm/sumologic/conf/setup/setup.sh index f4e485978d..08b965f711 100755 --- a/deploy/helm/sumologic/conf/setup/setup.sh +++ b/deploy/helm/sumologic/conf/setup/setup.sh @@ -40,7 +40,7 @@ function fix_sumo_base_url() { | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/deploy/helm/sumologic/templates/_helpers/_common.tpl b/deploy/helm/sumologic/templates/_helpers/_common.tpl index b24a9ff098..de20f4819c 100644 --- a/deploy/helm/sumologic/templates/_helpers/_common.tpl +++ b/deploy/helm/sumologic/templates/_helpers/_common.tpl @@ -79,6 +79,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- template "sumologic.labels.app" . }} {{- end -}} +{{- define "sumologic.labels.app.setup.pods" -}} +sumologic.com/app: setup +{{- end -}} + {{- define "sumologic.labels.app.setup.job" -}} {{- template "sumologic.labels.app.setup" . }} {{- end -}} @@ -489,6 +493,14 @@ Example Usage: {{- end -}} {{- end -}} +{{- define "pod-ip" -}} +- name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP +{{- end -}} + {{/* Pod anti affinity "hard" diff --git a/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml b/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml index 2050170386..aa293f6269 100644 --- a/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml +++ b/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml @@ -120,6 +120,7 @@ spec: {{- $ctx := .Values -}} {{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "events") | nindent 8 -}} {{- include "proxy-env-variables" . | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if .Values.otelevents.statefulset.extraEnvVars }} {{ toYaml .Values.otelevents.statefulset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/instrumentation/otelcol-instrumentation/statefulset.yaml b/deploy/helm/sumologic/templates/instrumentation/otelcol-instrumentation/statefulset.yaml index c2f0a76d87..1660d4bf60 100644 --- a/deploy/helm/sumologic/templates/instrumentation/otelcol-instrumentation/statefulset.yaml +++ b/deploy/helm/sumologic/templates/instrumentation/otelcol-instrumentation/statefulset.yaml @@ -136,6 +136,7 @@ spec: env: {{- $ctx := .Values -}} {{- include "kubernetes.sources.env" (dict "Context" $ctx "Type" "metrics" "Name" "default" ) | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if $otelcolInstrumentation.statefulset.extraEnvVars }} {{- toYaml $otelcolInstrumentation.statefulset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/instrumentation/traces-gateway/deployment.yaml b/deploy/helm/sumologic/templates/instrumentation/traces-gateway/deployment.yaml index 2d06d143e8..015c610d3b 100644 --- a/deploy/helm/sumologic/templates/instrumentation/traces-gateway/deployment.yaml +++ b/deploy/helm/sumologic/templates/instrumentation/traces-gateway/deployment.yaml @@ -75,6 +75,7 @@ spec: {{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "traces") | nindent 8 -}} {{- include "kubernetes.sources.env" (dict "Context" $ctx "Type" "metrics" "Name" "default" ) | nindent 8 }} {{- include "proxy-env-variables" . | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if $tracesGateway.deployment.extraEnvVars }} {{- toYaml $tracesGateway.deployment.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/instrumentation/traces-sampler/deployment.yaml b/deploy/helm/sumologic/templates/instrumentation/traces-sampler/deployment.yaml index 85c7114213..4e6a1676ba 100644 --- a/deploy/helm/sumologic/templates/instrumentation/traces-sampler/deployment.yaml +++ b/deploy/helm/sumologic/templates/instrumentation/traces-sampler/deployment.yaml @@ -66,6 +66,7 @@ spec: {{- $ctx := .Values -}} {{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "traces") | nindent 8 -}} {{- include "proxy-env-variables" . | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if $tracesSampler.deployment.extraEnvVars }} {{- toYaml $tracesSampler.deployment.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml b/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml index 785d1b193a..825b6db588 100644 --- a/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml +++ b/deploy/helm/sumologic/templates/logs/collector/otelcol-cloudwatch/statefulset.yaml @@ -117,4 +117,5 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace +{{- include "pod-ip" . | nindent 8 -}} {{- end }} diff --git a/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml b/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml index 9fc2e63e4c..e2aa47d7a9 100644 --- a/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml +++ b/deploy/helm/sumologic/templates/logs/collector/otelcol/daemonset.yaml @@ -127,6 +127,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace +{{- include "pod-ip" . | nindent 8 -}} {{- if $daemonset.extraEnvVars }} {{ toYaml $daemonset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/logs/collector/otellogswindows/daemonset.yaml b/deploy/helm/sumologic/templates/logs/collector/otellogswindows/daemonset.yaml index ccadf4189f..0325f3315f 100644 --- a/deploy/helm/sumologic/templates/logs/collector/otellogswindows/daemonset.yaml +++ b/deploy/helm/sumologic/templates/logs/collector/otellogswindows/daemonset.yaml @@ -132,6 +132,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace +{{- include "pod-ip" . | nindent 8 -}} {{- if $daemonset.extraEnvVars }} {{ toYaml $daemonset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml b/deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml index 5b60d50b81..9f953ddf13 100644 --- a/deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml +++ b/deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml @@ -141,6 +141,7 @@ spec: {{- $ctx := .Values -}} {{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "logs") | nindent 8 -}} {{- include "proxy-env-variables" . | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if .Values.metadata.logs.statefulset.extraEnvVars }} {{- toYaml .Values.metadata.logs.statefulset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/metrics/collector/otelcol/opentelemetrycollector.yaml b/deploy/helm/sumologic/templates/metrics/collector/otelcol/opentelemetrycollector.yaml index ca2bf84215..08710b044a 100644 --- a/deploy/helm/sumologic/templates/metrics/collector/otelcol/opentelemetrycollector.yaml +++ b/deploy/helm/sumologic/templates/metrics/collector/otelcol/opentelemetrycollector.yaml @@ -98,6 +98,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP podAnnotations: ## The operator adds this annotation by default, but we use our own ServiceMonitor prometheus.io/scrape: "false" diff --git a/deploy/helm/sumologic/templates/metrics/otelcol/statefulset.yaml b/deploy/helm/sumologic/templates/metrics/otelcol/statefulset.yaml index 99b4e05495..4f14c131ca 100644 --- a/deploy/helm/sumologic/templates/metrics/otelcol/statefulset.yaml +++ b/deploy/helm/sumologic/templates/metrics/otelcol/statefulset.yaml @@ -137,6 +137,7 @@ spec: {{- $ctx := .Values -}} {{- include "kubernetes.sources.envs" (dict "Context" $ctx "Type" "metrics") | nindent 8 -}} {{- include "proxy-env-variables" . | nindent 8 -}} +{{- include "pod-ip" . | nindent 8 -}} {{- if .Values.metadata.metrics.statefulset.extraEnvVars }} {{ toYaml .Values.metadata.metrics.statefulset.extraEnvVars | nindent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/templates/setup/job.yaml b/deploy/helm/sumologic/templates/setup/job.yaml index 9a1093cdc9..dc18adf21b 100644 --- a/deploy/helm/sumologic/templates/setup/job.yaml +++ b/deploy/helm/sumologic/templates/setup/job.yaml @@ -15,6 +15,7 @@ metadata: labels: app: {{ template "sumologic.labels.app.setup.job" . }} {{- include "sumologic.labels.common" . | nindent 4 }} + {{- include "sumologic.labels.app.setup.pods" . | nindent 4 }} spec: ttlSecondsAfterFinished: {{ .Values.sumologic.setup.job.ttlSecondsAfterFinished }} template: @@ -27,6 +28,7 @@ spec: {{ toYaml .Values.sumologic.setup.job.podAnnotations | indent 8 }} {{- end }} labels: +{{- include "sumologic.labels.app.setup.pods" . | nindent 8 }} {{- if .Values.sumologic.podLabels }} {{ toYaml .Values.sumologic.podLabels | indent 8 }} {{- end }} diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index feeed50874..4ac1e9bc2c 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -264,7 +264,7 @@ sumologic: ### Global configuration for OpenTelemetry Collector otelcolImage: repository: "public.ecr.aws/sumologic/sumologic-otel-collector" - tag: "0.102.1-sumo-0" + tag: "0.104.0-sumo-1" ## Add a -fips suffix to all image tags. With default tags, this results in FIPS-compliant otel images. ## See https://github.com/SumoLogic/sumologic-otel-collector/blob/main/docs/fips.md for more information. @@ -600,6 +600,9 @@ sumologic: ## - kubelet_runtime_operations_duration_seconds dropHistogramBuckets: true + ## A regular expression to allow selected histogram metrics, including the buckets. + allowHistogramRegex: "^$" + ## A regular expression for namespaces. ## Metrics that match these namespaces will be excluded from Sumo. excludeNamespaceRegex: "" @@ -1117,11 +1120,11 @@ kube-prometheus-stack: ## kube_statefulset_replicas ## kube_statefulset_status_observed_generation ## kube_statefulset_status_replicas - ## kube_hpa_spec_max_replicas - ## kube_hpa_spec_min_replicas - ## kube_hpa_status_condition - ## kube_hpa_status_current_replicas - ## kube_hpa_status_desired_replicas + ## kube_horizontalpodautoscaler_spec_max_replicas + ## kube_horizontalpodautoscaler_spec_min_replicas + ## kube_horizontalpodautoscaler_status_condition + ## kube_horizontalpodautoscaler_status_current_replicas + ## kube_horizontalpodautoscaler_status_desired_replicas ## kube pod state metrics ## kube_pod_container_info ## kube_pod_container_resource_limits @@ -1138,7 +1141,7 @@ kube-prometheus-stack: ## kube_service_status_load_balancer_ingress metricRelabelings: - action: keep - regex: (?:kube_statefulset_status_observed_generation|kube_statefulset_status_replicas|kube_statefulset_replicas|kube_statefulset_metadata_generation|kube_daemonset_status_current_number_scheduled|kube_daemonset_status_desired_number_scheduled|kube_daemonset_status_number_misscheduled|kube_daemonset_status_number_unavailable|kube_deployment_spec_replicas|kube_deployment_status_replicas_available|kube_deployment_status_replicas_unavailable|kube_node_info|kube_node_status_allocatable|kube_node_status_capacity|kube_node_status_condition|kube_hpa_spec_max_replicas|kube_hpa_spec_min_replicas|kube_hpa_status_(condition|(current|desired)_replicas)|kube_pod_container_info|kube_pod_container_resource_requests|kube_pod_container_resource_limits|kube_pod_container_status_ready|kube_pod_container_status_terminated_reason|kube_pod_container_status_waiting_reason|kube_pod_container_status_restarts_total|kube_pod_status_phase|kube_pod_info|kube_service_info|kube_service_spec_external_ip|kube_service_spec_type|kube_service_status_load_balancer_ingress) + regex: (?:kube_statefulset_status_observed_generation|kube_statefulset_status_replicas|kube_statefulset_replicas|kube_statefulset_metadata_generation|kube_daemonset_status_current_number_scheduled|kube_daemonset_status_desired_number_scheduled|kube_daemonset_status_number_misscheduled|kube_daemonset_status_number_unavailable|kube_deployment_spec_replicas|kube_deployment_status_replicas_available|kube_deployment_status_replicas_unavailable|kube_node_info|kube_node_status_allocatable|kube_node_status_capacity|kube_node_status_condition|kube_horizontalpodautoscaler_spec_max_replicas|kube_horizontalpodautoscaler_spec_min_replicas|kube_horizontalpodautoscaler_status_(condition|(current|desired)_replicas)|kube_pod_container_info|kube_pod_container_resource_requests|kube_pod_container_resource_limits|kube_pod_container_status_ready|kube_pod_container_status_terminated_reason|kube_pod_container_status_waiting_reason|kube_pod_container_status_restarts_total|kube_pod_status_phase|kube_pod_info|kube_service_info|kube_service_spec_external_ip|kube_service_spec_type|kube_service_status_load_balancer_ingress) sourceLabels: [__name__] ## Drop unnecessary labels Prometheus adds to these metrics ## We don't want container=kube-state-metrics on everything @@ -2485,7 +2488,7 @@ opentelemetry-operator: repository: public.ecr.aws/sumologic/opentelemetry-operator collectorImage: repository: "public.ecr.aws/sumologic/sumologic-otel-collector" - tag: "0.102.1-sumo-0" + tag: "0.104.0-sumo-1" autoInstrumentationImage: java: repository: public.ecr.aws/sumologic/autoinstrumentation-java diff --git a/docs/README.md b/docs/README.md index e0b3b8eaf1..509272c72e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -96,7 +96,7 @@ The following table displays the tested Kubernetes and Helm versions. | ---------------------- | ------------------------------------------------- | | K8s with EKS | 1.25
1.26
1.27
1.28
1.29
1.30 | | K8s with EKS (fargate) | 1.25
1.26
1.27
1.28
1.29
1.30 | -| K8s with Kops | 1.25
1.26
1.27
1.28
1.29
1.30 | +| K8s with Kops | 1.25
1.26
1.27
1.28
1.29 | | K8s with GKE | 1.26
1.27
1.28
1.29
1.30 | | K8s with AKS | 1.26
1.27
1.28
1.29
1.30 | | OpenShift | 4.12
4.13
4.14
4.15
4.16 | @@ -107,7 +107,7 @@ The following table displays the currently used software versions for our Helm c | Name | Version | | ----------------------------------------- | ------- | -| OpenTelemetry Collector | 0.102.1 | +| OpenTelemetry Collector | 0.104.0 | | OpenTelemetry Operator | 0.56.1 | | kube-prometheus-stack/Prometheus Operator | 40.5.0 | | Falco | 3.8.7 | diff --git a/docs/filtering.md b/docs/filtering.md index 6b75a3103d..071833032b 100644 --- a/docs/filtering.md +++ b/docs/filtering.md @@ -280,6 +280,18 @@ sumologic: ## Metrics +### Allow Histogram metrics + +All Histogram metrics are now dropped by default. To allow histogram metrics, please use the following regex + +```yaml +sumologic: + metrics: + allowHistogramRegex: "^(apiserver_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$" +``` + +**Note**: Please use the base metric name to allow histogram metrics. + ### Filter out app metrics We have defined some default filters to drop app metrics that are not relevant for Sumo Logic dashboards. To enable these filters, add the diff --git a/docs/scraped-metrics.md b/docs/scraped-metrics.md index 81807c87f9..bf763e4126 100644 --- a/docs/scraped-metrics.md +++ b/docs/scraped-metrics.md @@ -32,163 +32,119 @@ ## Metrics -The following table contains information about metrics scraped by Sumo Logic's Prometheus: +The following table contains information about metrics scraped by Sumo Logic's metrics collector: - name - name of the metric - source - originated source of the metric -- forwarded - `yes` if metric is being forwarded to Sumo Logic - -| name | source | forwarded | -| -------------------------------------------------------- | ------------------ | --------- | -| `apiserver_request_count` | apiserver | yes | -| `apiserver_request_total` | apiserver | yes | -| `apiserver_request_duration_seconds_count` | apiserver | yes | -| `apiserver_request_duration_seconds_bucket` | apiserver | no | -| `apiserver_request_duration_seconds_sum` | apiserver | yes | -| `apiserver_request_latencies_count` | apiserver | yes | -| `apiserver_request_latencies_sum` | apiserver | yes | -| `apiserver_request_latencies_summary` | apiserver | yes | -| `apiserver_request_latencies_summary_count` | apiserver | yes | -| `apiserver_request_latencies_summary_sum` | apiserver | yes | -| `kubelet_docker_operations_errors` | kubelet | yes | -| `kubelet_docker_operations_errors_total` | kubelet | yes | -| `kubelet_docker_operations_duration_seconds_count` | kubelet | yes | -| `kubelet_docker_operations_duration_seconds_sum` | kubelet | yes | -| `kubelet_runtime_operations_duration_seconds_count` | kubelet | yes | -| `kubelet_runtime_operations_duration_seconds_sum` | kubelet | yes | -| `kubelet_running_container_count` | kubelet | yes | -| `kubelet_running_containers` | kubelet | yes | -| `kubelet_running_pod_count` | kubelet | yes | -| `kubelet_running_pods` | kubelet | yes | -| `kubelet_docker_operations_latency_microseconds` | kubelet | yes | -| `kubelet_docker_operations_latency_microseconds_count` | kubelet | yes | -| `kubelet_docker_operations_latency_microseconds_sum` | kubelet | yes | -| `kubelet_runtime_operations_latency_microseconds` | kubelet | yes | -| `kubelet_runtime_operations_latency_microseconds_count` | kubelet | yes | -| `kubelet_runtime_operations_latency_microseconds_sum` | kubelet | yes | -| `container_cpu_usage_seconds_total` | cadvisor | yes | -| `container_fs_limit_bytes` | cadvisor | yes | -| `container_fs_usage_bytes` | cadvisor | yes | -| `container_memory_working_set_bytes` | cadvisor | yes | -| `container_cpu_cfs_throttled_seconds_total` | cadvisor | yes | -| `container_network_receive_bytes_total` | cadvisor | yes | -| `container_network_transmit_bytes_total` | cadvisor | yes | -| `cloudprovider_aws_api_request_duration_seconds_bucket` | kube-controller | yes | -| `cloudprovider_aws_api_request_duration_seconds_count` | kube-controller | yes | -| `cloudprovider_aws_api_request_duration_seconds_sum` | kube-controller | yes | -| `coredns_cache_size` | coredns | yes | -| `coredns_cache_entries` | coredns | yes | -| `coredns_cache_hits_total` | coredns | yes | -| `coredns_cache_misses_total` | coredns | yes | -| `coredns_dns_request_duration_seconds_count` | coredns | yes | -| `coredns_dns_request_duration_seconds_sum` | coredns | yes | -| `coredns_dns_request_count_total` | coredns | yes | -| `coredns_dns_requests_total` | coredns | yes | -| `coredns_dns_response_rcode_count_total` | coredns | yes | -| `coredns_dns_responses_total` | coredns | yes | -| `coredns_forward_request_count_total` | coredns | yes | -| `coredns_forward_requests_total` | coredns | yes | -| `coredns_proxy_request_duration_seconds_sum` | coredns | yes | -| `coredns_proxy_request_duration_seconds_count` | coredns | yes | -| `coredns_proxy_request_duration_seconds_bucket` | coredns | yes | -| `process_cpu_seconds_total` | coredns | yes | -| `process_open_fds` | coredns | yes | -| `process_resident_memory_bytes` | coredns | yes | -| `etcd_request_cache_get_duration_seconds_count` | kube-etcd | yes | -| `etcd_request_cache_get_duration_seconds_sum` | kube-etcd | yes | -| `etcd_request_cache_add_duration_seconds_count` | kube-etcd | yes | -| `etcd_request_cache_add_duration_seconds_sum` | kube-etcd | yes | -| `etcd_request_cache_add_latencies_summary_count` | kube-etcd | yes | -| `etcd_request_cache_add_latencies_summary_sum` | kube-etcd | yes | -| `etcd_request_cache_get_latencies_summary_count` | kube-etcd | yes | -| `etcd_request_cache_get_latencies_summary_sum` | kube-etcd | yes | -| `etcd_helper_cache_hit_count` | kube-etcd | yes | -| `etcd_helper_cache_hit_total` | kube-etcd | yes | -| `etcd_helper_cache_miss_count` | kube-etcd | yes | -| `etcd_helper_cache_miss_total` | kube-etcd | yes | -| `etcd_debugging_mvcc_db_total_size_in_bytes` | etcd-server | yes | -| `etcd_debugging_store_expires_total` | etcd-server | yes | -| `etcd_debugging_store_watchers` | etcd-server | yes | -| `etcd_disk_backend_commit_duration_seconds_bucket` | etcd-server | yes | -| `etcd_disk_wal_fsync_duration_seconds_bucket` | etcd-server | yes | -| `etcd_grpc_proxy_cache_hits_total` | etcd-server | yes | -| `etcd_grpc_proxy_cache_misses_total` | etcd-server | yes | -| `etcd_network_client_grpc_received_bytes_total` | etcd-server | yes | -| `etcd_network_client_grpc_sent_bytes_total` | etcd-server | yes | -| `etcd_server_has_leader` | etcd-server | yes | -| `etcd_server_leader_changes_seen_total` | etcd-server | yes | -| `etcd_server_proposals_applied_total` | etcd-server | yes | -| `etcd_server_proposals_committed_total` | etcd-server | yes | -| `etcd_server_proposals_failed_total` | etcd-server | yes | -| `etcd_server_proposals_pending` | etcd-server | yes | -| `process_cpu_seconds_total` | etcd-server | yes | -| `process_open_fds` | etcd-server | yes | -| `process_resident_memory_bytes` | etcd-server | yes | -| `scheduler` metrics_latency_microseconds | kube-scheduler | yes | -| `scheduler_e2e_scheduling_duration_seconds_bucket` | kube-scheduler | yes | -| `scheduler_e2e_scheduling_duration_seconds_count` | kube-scheduler | yes | -| `scheduler_e2e_scheduling_duration_seconds_sum` | kube-scheduler | yes | -| `scheduler_binding_duration_seconds_bucket` | kube-scheduler | no | -| `scheduler_binding_duration_seconds_count` | kube-scheduler | yes | -| `scheduler_binding_duration_seconds_sum` | kube-scheduler | yes | -| `scheduler_scheduling_algorithm_duration_seconds_bucket` | kube-scheduler | no | -| `scheduler_scheduling_algorithm_duration_seconds_count` | kube-scheduler | yes | -| `scheduler_scheduling_algorithm_duration_seconds_sum` | kube-scheduler | yes | -| `kube_daemonset_status_current_number_scheduled` | kube-state-metrics | yes | -| `kube_daemonset_status_desired_number_scheduled` | kube-state-metrics | yes | -| `kube_daemonset_status_number_misscheduled` | kube-state-metrics | yes | -| `kube_daemonset_status_number_unavailable` | kube-state-metrics | yes | -| `kube_deployment_spec_replicas` | kube-state-metrics | yes | -| `kube_deployment_status_replicas_available` | kube-state-metrics | yes | -| `kube_deployment_status_replicas_unavailable` | kube-state-metrics | yes | -| `kube_node_info` | kube-state-metrics | yes | -| `kube_node_status_allocatable` | kube-state-metrics | yes | -| `kube_node_status_capacity` | kube-state-metrics | yes | -| `kube_node_status_condition` | kube-state-metrics | yes | -| `kube_statefulset_metadata_generation` | kube-state-metrics | yes | -| `kube_statefulset_replicas` | kube-state-metrics | yes | -| `kube_statefulset_status_observed_generation` | kube-state-metrics | yes | -| `kube_statefulset_status_replicas` | kube-state-metrics | yes | -| `kube_hpa_spec_max_replicas` | kube-state-metrics | yes | -| `kube_hpa_spec_min_replicas` | kube-state-metrics | yes | -| `kube_hpa_status_condition` | kube-state-metrics | yes | -| `kube_hpa_status_current_replicas` | kube-state-metrics | yes | -| `kube_hpa_status_desired_replicas` | kube-state-metrics | yes | -| `kube` pod state metrics | kube-state-metrics | yes | -| `kube_pod_container_info` | kube-state-metrics | yes | -| `kube_pod_container_resource_limits` | kube-state-metrics | yes | -| `kube_pod_container_resource_requests` | kube-state-metrics | yes | -| `kube_pod_container_status_ready` | kube-state-metrics | yes | -| `kube_pod_container_status_restarts_total` | kube-state-metrics | yes | -| `kube_pod_container_status_terminated_reason` | kube-state-metrics | yes | -| `kube_pod_container_status_waiting_reason` | kube-state-metrics | yes | -| `kube_pod_status_phase` | kube-state-metrics | yes | -| `kube_pod_info` | kube-state-metrics | yes | -| `kube_service_info` | kube-state-metrics | yes | -| `kube_service_spec_external_ip` | kube-state-metrics | yes | -| `kube_service_spec_type` | kube-state-metrics | yes | -| `kube_service_status_load_balancer_ingress` | kube-state-metrics | yes | -| `node_cpu_seconds_total` | node-exporter | yes | -| `node_load1` | node-exporter | yes | -| `node_load5` | node-exporter | yes | -| `node_load15` | node-exporter | yes | -| `node_disk_io_time_weighted_seconds_total` | node-exporter | yes | -| `node_disk_io_time_seconds_total` | node-exporter | yes | -| `node_vmstat_pgpgin` | node-exporter | yes | -| `node_vmstat_pgpgout` | node-exporter | yes | -| `node_memory_MemFree_bytes` | node-exporter | yes | -| `node_memory_MemAvailable_bytes` | node-exporter | yes | -| `node_memory_Cached_bytes` | node-exporter | yes | -| `node_memory_Buffers_bytes` | node-exporter | yes | -| `node_memory_MemTotal_bytes` | node-exporter | yes | -| `node_network_receive_drop_total` | node-exporter | yes | -| `node_network_transmit_drop_total` | node-exporter | yes | -| `node_network_receive_bytes_total` | node-exporter | yes | -| `node_network_transmit_bytes_total` | node-exporter | yes | -| `node_filesystem_avail_bytes` | node-exporter | yes | -| `node_filesystem_size_bytes` | node-exporter | yes | -| `node_filesystem_files_free` | node-exporter | yes | -| `node_filesystem_files` | node-exporter | yes | + +| name | source | +| ------------------------------------------------------ | ------------------ | +| `apiserver_request_count` | apiserver | +| `apiserver_request_total` | apiserver | +| `kubelet_docker_operations_errors` | kubelet | +| `kubelet_docker_operations_errors_total` | kubelet | +| `kubelet_running_container_count` | kubelet | +| `kubelet_running_containers` | kubelet | +| `kubelet_running_pod_count` | kubelet | +| `kubelet_running_pods` | kubelet | +| `kubelet_docker_operations_latency_microseconds` | kubelet | +| `kubelet_runtime_operations_latency_microseconds` | kubelet | +| `container_cpu_usage_seconds_total` | cadvisor | +| `container_fs_limit_bytes` | cadvisor | +| `container_fs_usage_bytes` | cadvisor | +| `container_memory_working_set_bytes` | cadvisor | +| `container_cpu_cfs_throttled_seconds_total` | cadvisor | +| `container_network_receive_bytes_total` | cadvisor | +| `container_network_transmit_bytes_total` | cadvisor | +| `coredns_cache_size` | coredns | +| `coredns_cache_entries` | coredns | +| `coredns_cache_hits_total` | coredns | +| `coredns_cache_misses_total` | coredns | +| `coredns_dns_request_count_total` | coredns | +| `coredns_dns_requests_total` | coredns | +| `coredns_dns_response_rcode_count_total` | coredns | +| `coredns_dns_responses_total` | coredns | +| `coredns_forward_request_count_total` | coredns | +| `coredns_forward_requests_total` | coredns | +| `process_cpu_seconds_total` | coredns | +| `process_open_fds` | coredns | +| `process_resident_memory_bytes` | coredns | +| `etcd_helper_cache_hit_count` | kube-etcd | +| `etcd_helper_cache_hit_total` | kube-etcd | +| `etcd_helper_cache_miss_count` | kube-etcd | +| `etcd_helper_cache_miss_total` | kube-etcd | +| `etcd_debugging_mvcc_db_total_size_in_bytes` | etcd-server | +| `etcd_debugging_store_expires_total` | etcd-server | +| `etcd_debugging_store_watchers` | etcd-server | +| `etcd_grpc_proxy_cache_hits_total` | etcd-server | +| `etcd_grpc_proxy_cache_misses_total` | etcd-server | +| `etcd_network_client_grpc_received_bytes_total` | etcd-server | +| `etcd_network_client_grpc_sent_bytes_total` | etcd-server | +| `etcd_server_has_leader` | etcd-server | +| `etcd_server_leader_changes_seen_total` | etcd-server | +| `etcd_server_proposals_applied_total` | etcd-server | +| `etcd_server_proposals_committed_total` | etcd-server | +| `etcd_server_proposals_failed_total` | etcd-server | +| `etcd_server_proposals_pending` | etcd-server | +| `process_cpu_seconds_total` | etcd-server | +| `process_open_fds` | etcd-server | +| `process_resident_memory_bytes` | etcd-server | +| `scheduler` metrics_latency_microseconds | kube-scheduler | +| `kube_daemonset_status_current_number_scheduled` | kube-state-metrics | +| `kube_daemonset_status_desired_number_scheduled` | kube-state-metrics | +| `kube_daemonset_status_number_misscheduled` | kube-state-metrics | +| `kube_daemonset_status_number_unavailable` | kube-state-metrics | +| `kube_deployment_spec_replicas` | kube-state-metrics | +| `kube_deployment_status_replicas_available` | kube-state-metrics | +| `kube_deployment_status_replicas_unavailable` | kube-state-metrics | +| `kube_node_info` | kube-state-metrics | +| `kube_node_status_allocatable` | kube-state-metrics | +| `kube_node_status_capacity` | kube-state-metrics | +| `kube_node_status_condition` | kube-state-metrics | +| `kube_statefulset_metadata_generation` | kube-state-metrics | +| `kube_statefulset_replicas` | kube-state-metrics | +| `kube_statefulset_status_observed_generation` | kube-state-metrics | +| `kube_statefulset_status_replicas` | kube-state-metrics | +| `kube_horizontalpodautoscaler_spec_max_replicas` | kube-state-metrics | +| `kube_horizontalpodautoscaler_spec_min_replicas` | kube-state-metrics | +| `kube_horizontalpodautoscaler_status_condition` | kube-state-metrics | +| `kube_horizontalpodautoscaler_status_current_replicas` | kube-state-metrics | +| `kube_horizontalpodautoscaler_status_desired_replicas` | kube-state-metrics | +| `kube` pod state metrics | kube-state-metrics | +| `kube_pod_container_info` | kube-state-metrics | +| `kube_pod_container_resource_limits` | kube-state-metrics | +| `kube_pod_container_resource_requests` | kube-state-metrics | +| `kube_pod_container_status_ready` | kube-state-metrics | +| `kube_pod_container_status_restarts_total` | kube-state-metrics | +| `kube_pod_container_status_terminated_reason` | kube-state-metrics | +| `kube_pod_container_status_waiting_reason` | kube-state-metrics | +| `kube_pod_status_phase` | kube-state-metrics | +| `kube_pod_info` | kube-state-metrics | +| `kube_service_info` | kube-state-metrics | +| `kube_service_spec_external_ip` | kube-state-metrics | +| `kube_service_spec_type` | kube-state-metrics | +| `kube_service_status_load_balancer_ingress` | kube-state-metrics | +| `node_cpu_seconds_total` | node-exporter | +| `node_load1` | node-exporter | +| `node_load5` | node-exporter | +| `node_load15` | node-exporter | +| `node_disk_io_time_weighted_seconds_total` | node-exporter | +| `node_disk_io_time_seconds_total` | node-exporter | +| `node_vmstat_pgpgin` | node-exporter | +| `node_vmstat_pgpgout` | node-exporter | +| `node_memory_MemFree_bytes` | node-exporter | +| `node_memory_MemAvailable_bytes` | node-exporter | +| `node_memory_Cached_bytes` | node-exporter | +| `node_memory_Buffers_bytes` | node-exporter | +| `node_memory_MemTotal_bytes` | node-exporter | +| `node_network_receive_drop_total` | node-exporter | +| `node_network_transmit_drop_total` | node-exporter | +| `node_network_receive_bytes_total` | node-exporter | +| `node_network_transmit_bytes_total` | node-exporter | +| `node_filesystem_avail_bytes` | node-exporter | +| `node_filesystem_size_bytes` | node-exporter | +| `node_filesystem_files_free` | node-exporter | +| `node_filesystem_files` | node-exporter | ## Aggregations (removed) diff --git a/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml index f7329adaf7..2da8c250ca 100644 --- a/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc/basic.output.yaml @@ -24,7 +24,8 @@ data: file_storage: directory: /var/lib/storage/events timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/events_otc/options.output.yaml b/tests/helm/testdata/goldenfile/events_otc/options.output.yaml index 681660238b..92c869c26e 100644 --- a/tests/helm/testdata/goldenfile/events_otc/options.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc/options.output.yaml @@ -20,7 +20,8 @@ data: sending_queue: enabled: true extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/events_otc/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/events_otc/sumologic-mock.output.yaml index a38b47c950..9df996dd8a 100644 --- a/tests/helm/testdata/goldenfile/events_otc/sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc/sumologic-mock.output.yaml @@ -32,7 +32,8 @@ data: file_storage: directory: /var/lib/storage/events timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml index 7b33f79204..a5b794b791 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/basic.output.yaml @@ -72,7 +72,7 @@ spec: priorityClassName: "prio" containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otel/config.yaml @@ -135,6 +135,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/common.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/common.output.yaml index 71f5a99685..9a33da064c 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/common.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/common.output.yaml @@ -73,7 +73,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otel/config.yaml @@ -133,6 +133,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP volumeClaimTemplates: - metadata: name: file-storage diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml index 3da0f71777..78bfcbe49d 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/custom.output.yaml @@ -119,6 +119,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP volumeClaimTemplates: - metadata: name: file-storage diff --git a/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml b/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml index bb5c25ad4c..318886352b 100644 --- a/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml +++ b/tests/helm/testdata/goldenfile/events_otc_statefulset/proxy.output.yaml @@ -60,7 +60,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otel/config.yaml @@ -124,6 +124,11 @@ spec: value: https://proxy.internal - name: NO_PROXY value: http://non-proxy.internal + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP volumeClaimTemplates: - metadata: name: file-storage diff --git a/tests/helm/testdata/goldenfile/logs_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/logs_otc/basic.output.yaml index 365038aff5..c2083da504 100644 --- a/tests/helm/testdata/goldenfile/logs_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc/basic.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc/debug.output.yaml b/tests/helm/testdata/goldenfile/logs_otc/debug.output.yaml index c7d0cb71fa..2dafaea9ca 100644 --- a/tests/helm/testdata/goldenfile/logs_otc/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc/debug.output.yaml @@ -27,7 +27,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc/options.output.yaml b/tests/helm/testdata/goldenfile/logs_otc/options.output.yaml index 1952b2adaf..db3b44342c 100644 --- a/tests/helm/testdata/goldenfile/logs_otc/options.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc/options.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/basic.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/basic.output.yaml index 140a1196a2..187515c82c 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/basic.output.yaml @@ -41,7 +41,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otelcol/config.yaml @@ -93,3 +93,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP diff --git a/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/custom.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/custom.output.yaml index a9ddf6b985..05956e4541 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_cloudwatch/custom.output.yaml @@ -88,3 +88,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional-complex.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional-complex.output.yaml index 1d7df93bbd..c4c792547e 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional-complex.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional-complex.output.yaml @@ -54,7 +54,7 @@ spec: containers: - args: - --config=/etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -99,6 +99,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional.output.yaml index c3942b82a9..f1235ca134 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/additional.output.yaml @@ -47,7 +47,7 @@ spec: containers: - args: - --config=/etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -89,6 +89,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP securityContext: capabilities: drop: diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/basic.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/basic.output.yaml index f4116fb879..933c7340ad 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/basic.output.yaml @@ -38,7 +38,7 @@ spec: containers: - args: - --config=/etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -80,6 +80,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP securityContext: capabilities: drop: diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml index 68eb711fc0..e888bfaba2 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/complex.output.yaml @@ -91,6 +91,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/logs_otc_daemonset/multiple_multiline.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_daemonset/multiple_multiline.output.yaml index 5f206747f7..6a8e98b4bb 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_daemonset/multiple_multiline.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_daemonset/multiple_multiline.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/basic.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/basic.output.yaml index 985b1e1285..48edf458be 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/basic.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/debug.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/debug.output.yaml index 366b17c151..c1d42ea7a1 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/debug.output.yaml @@ -27,7 +27,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/options.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/options.output.yaml index 34c55b397c..f4cfc75507 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/options.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/configmap/options.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional-complex.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional-complex.output.yaml index ae5dde55d2..f61ba22141 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional-complex.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional-complex.output.yaml @@ -62,7 +62,7 @@ spec: - "otelcol-sumo.exe" args: - --config=etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -107,6 +107,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional.output.yaml index d9ce35dbe2..9b7cba3b23 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/additional.output.yaml @@ -52,7 +52,7 @@ spec: - "otelcol-sumo.exe" args: - --config=etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -94,6 +94,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP securityContext: capabilities: drop: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/basic.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/basic.output.yaml index 50732a5630..7d9553de9e 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/basic.output.yaml @@ -43,7 +43,7 @@ spec: - "otelcol-sumo.exe" args: - --config=etc/otelcol/config.yaml - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent name: otelcol livenessProbe: @@ -85,6 +85,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP securityContext: capabilities: drop: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/complex.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/complex.output.yaml index 1e0eae3352..17cdb5a19b 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/complex.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/complex.output.yaml @@ -99,6 +99,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/multiple_multiline.output.yaml b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/multiple_multiline.output.yaml index e7eb6e5f41..d598080d3b 100644 --- a/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/multiple_multiline.output.yaml +++ b/tests/helm/testdata/goldenfile/logs_otc_windows/daemonset/multiple_multiline.output.yaml @@ -25,7 +25,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug.output.yaml index 827a0903a7..a9638e9b1f 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug.output.yaml @@ -31,7 +31,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -281,7 +282,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock.output.yaml index bf687c2c40..907f2aaecb 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock.output.yaml @@ -40,7 +40,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -290,7 +291,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock_http.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock_http.output.yaml index d4a162115a..11c5b02dec 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock_http.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/debug_with_sumologic_mock_http.output.yaml @@ -54,7 +54,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -304,7 +305,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/extra_exporter.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/extra_exporter.output.yaml index ae97ec8dcf..11929eb01c 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/extra_exporter.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/extra_exporter.output.yaml @@ -33,7 +33,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -283,7 +284,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml index 45734c54f7..6d728776b3 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/otel.output.yaml @@ -29,7 +29,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -279,7 +280,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing.output.yaml index 3133052e2a..3fea5369be 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing.output.yaml @@ -33,7 +33,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -299,7 +300,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults.output.yaml index b99f3ad98a..0b79dc238f 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults.output.yaml @@ -33,7 +33,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -303,7 +304,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults_http.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults_http.output.yaml index f533c7e364..714e4d99a3 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults_http.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/routing_with_defaults_http.output.yaml @@ -40,7 +40,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -310,7 +311,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml index dbaccf60ee..f5e49c8d34 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc/templates.output.yaml @@ -29,7 +29,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: attributes/extract_systemd_source_fields: @@ -306,7 +307,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml index 34b7f7e30f..1b52fb834b 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/basic.output.yaml @@ -39,7 +39,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otel/config.yaml @@ -104,6 +104,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP volumeClaimTemplates: - metadata: name: file-storage diff --git a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml index 1033059378..a00a75841c 100644 --- a/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_logs_otc_statefulset/custom.output.yaml @@ -123,6 +123,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: secretKeyRef: diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml index 0dd0f94474..d956884a69 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/additional_endpoints.output.yaml @@ -32,7 +32,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -44,8 +45,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -155,7 +157,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.input.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.input.yaml new file mode 100644 index 0000000000..6d3942ee37 --- /dev/null +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.input.yaml @@ -0,0 +1,3 @@ +sumologic: + metrics: + allowHistogramRegex: "^(apiserver_request_duration_seconds)$" diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.output.yaml new file mode 100644 index 0000000000..7168f02a2f --- /dev/null +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/allow_histograms.output.yaml @@ -0,0 +1,205 @@ +--- +# Source: sumologic/templates/metrics/otelcol/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: RELEASE-NAME-sumologic-otelcol-metrics + namespace: sumologic + labels: + app: RELEASE-NAME-sumologic-otelcol-metrics + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +data: + config.yaml: | + exporters: + sumologic/default: + client: k8s_%CURRENT_CHART_VERSION% + decompose_otlp_histograms: true + endpoint: ${SUMO_ENDPOINT_DEFAULT_OTLP_METRICS_SOURCE} + max_request_body_size: 16777216 + metric_format: otlp + sending_queue: + enabled: true + num_consumers: 10 + queue_size: 10000 + storage: file_storage + timeout: 30s + extensions: + file_storage: + compaction: + directory: /tmp + on_rebound: true + directory: /var/lib/storage/otc + timeout: 10s + health_check: + endpoint: ${env:MY_POD_IP}:13133 + pprof: {} + processors: + batch: + send_batch_max_size: 2048 + send_batch_size: 1024 + timeout: 1s + filter/drop_unnecessary_metrics: + error_mode: ignore + metrics: + metric: + - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") + - (not IsMatch(name, "^(apiserver_request_duration_seconds)$")) and (type == + METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM + or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket")) + groupbyattrs: + keys: + - container + - namespace + - pod + - service + groupbyattrs/group_by_name: + keys: + - __name__ + - job + k8s_tagger: + extract: + delimiter: _ + labels: + - key: '*' + tag_name: pod_labels_%s + metadata: + - daemonSetName + - deploymentName + - nodeName + - replicaSetName + - serviceName + - statefulSetName + owner_lookup_enabled: true + passthrough: false + pod_association: + - from: build_hostname + memory_limiter: + check_interval: 5s + limit_percentage: 90 + spike_limit_percentage: 20 + metricstransform: + transforms: + action: update + include: ^prometheus_remote_write_(.*)$$ + match_type: regexp + new_name: $$1 + resource: + attributes: + - action: upsert + from_attribute: namespace + key: k8s.namespace.name + - action: delete + key: namespace + - action: upsert + from_attribute: pod + key: k8s.pod.name + - action: delete + key: pod + - action: upsert + from_attribute: container + key: k8s.container.name + - action: delete + key: container + - action: upsert + from_attribute: node + key: k8s.node.name + - action: delete + key: node + - action: upsert + from_attribute: service + key: prometheus_service + - action: delete + key: service + - action: upsert + from_attribute: service.name + key: job + - action: delete + key: service.name + - action: upsert + key: _origin + value: kubernetes + - action: upsert + key: cluster + value: kubernetes + resource/delete_source_metadata: + attributes: + - action: delete + key: _sourceCategory + - action: delete + key: _sourceHost + - action: delete + key: _sourceName + resource/remove_k8s_pod_pod_name: + attributes: + - action: delete + key: k8s.pod.pod_name + source: + collector: kubernetes + exclude: + k8s.namespace.name: "" + sumologic: + add_cloud_namespace: false + transform/remove_name: + error_mode: ignore + metric_statements: + - context: resource + statements: + - delete_key(attributes, "__name__") + transform/set_name: + error_mode: ignore + metric_statements: + - context: datapoint + statements: + - set(attributes["__name__"], metric.name) where IsMatch(metric.name, "^cloudprovider_.*") + receivers: + otlp: + protocols: + http: + endpoint: ${env:MY_POD_IP}:4318 + telegraf: + agent_config: | + [agent] + interval = "30s" + flush_interval = "30s" + omit_hostname = true + [[inputs.http_listener_v2]] + # wait longer than prometheus + read_timeout = "30s" + write_timeout = "30s" + service_address = ":9888" + data_format = "prometheusremotewrite" + paths = [ + "/prometheus.metrics" + ] + service: + extensions: + - health_check + - file_storage + - pprof + pipelines: + metrics: + exporters: + - sumologic/default + processors: + - memory_limiter + - metricstransform + - groupbyattrs + - resource + - k8s_tagger + - source + - sumologic + - resource/remove_k8s_pod_pod_name + - resource/delete_source_metadata + - transform/set_name + - groupbyattrs/group_by_name + - transform/remove_name + - filter/drop_unnecessary_metrics + - batch + receivers: + - telegraf + - otlp + telemetry: + logs: + level: info diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml index 9723ea1b07..5522ab6b70 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/basic.output.yaml @@ -32,7 +32,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -44,8 +45,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -155,7 +157,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml index 9ea3b748ab..0df6ba27b2 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/custom.output.yaml @@ -109,7 +109,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -121,8 +122,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -261,7 +263,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml index 84800fcfa6..c1ec269cc2 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug.output.yaml @@ -34,7 +34,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -46,8 +47,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -157,7 +159,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml index a90af0b7f4..da9261618a 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock.output.yaml @@ -57,7 +57,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -69,8 +70,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -180,7 +182,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml index 7ed2166af5..94ba3fd390 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/debug_with_sumologic_mock_http.output.yaml @@ -134,7 +134,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -146,8 +147,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -304,7 +306,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml index b35590bdd9..05f58ab2d3 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc/filtered_app_metrics.output.yaml @@ -32,7 +32,8 @@ data: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -68,8 +69,9 @@ data: metrics: metric: - resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*") - - type == METRIC_DATA_TYPE_HISTOGRAM or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM - or type == METRIC_DATA_TYPE_SUMMARY or IsMatch(name, ".*_bucket") + - (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM or type + == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + or IsMatch(name, ".*_bucket")) groupbyattrs: keys: - container @@ -179,7 +181,7 @@ data: otlp: protocols: http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 telegraf: agent_config: | [agent] diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml index f1e633fe9a..d187dabfc9 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/basic.output.yaml @@ -58,7 +58,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/etc/otel/config.yaml @@ -161,6 +161,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP volumeClaimTemplates: - metadata: name: file-storage diff --git a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml index 11e336572c..8e9994b5c9 100644 --- a/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metadata_metrics_otc_statefulset/custom.output.yaml @@ -172,6 +172,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP - name: VALUE_FROM_SECRET valueFrom: diff --git a/tests/helm/testdata/goldenfile/metrics_collector_otc/basic.output.yaml b/tests/helm/testdata/goldenfile/metrics_collector_otc/basic.output.yaml index 060e343bf0..ad2b69cd30 100644 --- a/tests/helm/testdata/goldenfile/metrics_collector_otc/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/metrics_collector_otc/basic.output.yaml @@ -13,7 +13,7 @@ metadata: heritage: "Helm" sumologic.com/scrape: "true" spec: - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" mode: statefulset replicas: 1 serviceAccount: RELEASE-NAME-sumologic-metrics @@ -48,6 +48,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP podAnnotations: ## The operator adds this annotation by default, but we use our own ServiceMonitor prometheus.io/scrape: "false" @@ -89,7 +94,8 @@ spec: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -115,10 +121,10 @@ spec: metric_statements: - context: metric statements: - - extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY - - extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + - extract_sum_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) + - extract_count_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) receivers: prometheus: config: diff --git a/tests/helm/testdata/goldenfile/metrics_collector_otc/custom.output.yaml b/tests/helm/testdata/goldenfile/metrics_collector_otc/custom.output.yaml index 2cf99549b8..5a80b1ed49 100644 --- a/tests/helm/testdata/goldenfile/metrics_collector_otc/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/metrics_collector_otc/custom.output.yaml @@ -83,6 +83,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP podAnnotations: ## The operator adds this annotation by default, but we use our own ServiceMonitor prometheus.io/scrape: "false" @@ -126,7 +131,8 @@ spec: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: diff --git a/tests/helm/testdata/goldenfile/metrics_collector_otc/debug.output.yaml b/tests/helm/testdata/goldenfile/metrics_collector_otc/debug.output.yaml index e0b10d8ff2..2fa705da43 100644 --- a/tests/helm/testdata/goldenfile/metrics_collector_otc/debug.output.yaml +++ b/tests/helm/testdata/goldenfile/metrics_collector_otc/debug.output.yaml @@ -13,7 +13,7 @@ metadata: heritage: "Helm" sumologic.com/scrape: "true" spec: - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" mode: statefulset replicas: 1 serviceAccount: RELEASE-NAME-sumologic-metrics @@ -48,6 +48,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP podAnnotations: ## The operator adds this annotation by default, but we use our own ServiceMonitor prometheus.io/scrape: "false" @@ -91,7 +96,8 @@ spec: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -117,10 +123,10 @@ spec: metric_statements: - context: metric statements: - - extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY - - extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + - extract_sum_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) + - extract_count_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) receivers: prometheus: config: diff --git a/tests/helm/testdata/goldenfile/metrics_collector_otc/kubelet.output.yaml b/tests/helm/testdata/goldenfile/metrics_collector_otc/kubelet.output.yaml index 64291fb19e..4d0fd2fe6e 100644 --- a/tests/helm/testdata/goldenfile/metrics_collector_otc/kubelet.output.yaml +++ b/tests/helm/testdata/goldenfile/metrics_collector_otc/kubelet.output.yaml @@ -13,7 +13,7 @@ metadata: heritage: "Helm" sumologic.com/scrape: "true" spec: - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" mode: statefulset replicas: 1 serviceAccount: RELEASE-NAME-sumologic-metrics @@ -48,6 +48,11 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP podAnnotations: ## The operator adds this annotation by default, but we use our own ServiceMonitor prometheus.io/scrape: "false" @@ -89,7 +94,8 @@ spec: on_rebound: true directory: /var/lib/storage/otc timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 pprof: {} processors: batch: @@ -115,10 +121,10 @@ spec: metric_statements: - context: metric statements: - - extract_sum_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY - - extract_count_metric(true) where type == METRIC_DATA_TYPE_HISTOGRAM or type - == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY + - extract_sum_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) + - extract_count_metric(true) where (not IsMatch(name, "^$")) and (type == METRIC_DATA_TYPE_HISTOGRAM + or type == METRIC_DATA_TYPE_EXPONENTIAL_HISTOGRAM or type == METRIC_DATA_TYPE_SUMMARY) receivers: prometheus: config: diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-merge.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-merge.output.yaml index ccb456f2e3..9d701da322 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-merge.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-merge.output.yaml @@ -17,7 +17,7 @@ data: endpoint: http://RELEASE-NAME-sumologic-traces-gateway.sumologic:4318 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -33,7 +33,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -102,27 +103,27 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-values-backward-compatibility.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-values-backward-compatibility.output.yaml index 6771abf99a..82d36d04b3 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-values-backward-compatibility.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/config-from-values-backward-compatibility.output.yaml @@ -1,6 +1,5 @@ --- # Source: sumologic/templates/instrumentation/otelcol-instrumentation/configmap.yaml -# Just a part of the config is present here for test purposes. In practice whole config from values.yaml should be a content. apiVersion: v1 kind: ConfigMap metadata: @@ -18,7 +17,7 @@ data: endpoint: http://RELEASE-NAME-sumologic-traces-gateway.sumologic:4318 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -34,7 +33,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -103,15 +103,15 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: @@ -121,9 +121,9 @@ data: otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.output.yaml index 24a84469e7..bd942d12ed 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.output.yaml @@ -29,7 +29,7 @@ data: port: 4317 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -45,7 +45,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -114,27 +115,27 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.sumologic-mock.output.yaml index 830e3153cc..2f83ac5fe5 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-disabled.sumologic-mock.output.yaml @@ -31,7 +31,7 @@ data: port: 4317 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -47,7 +47,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -116,27 +117,27 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.output.yaml index c0f246e84f..fba700ff9c 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.output.yaml @@ -17,7 +17,7 @@ data: endpoint: http://RELEASE-NAME-sumologic-traces-gateway.sumologic:4318 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -33,7 +33,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -102,27 +103,27 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.sumologic-mock.output.yaml index 830e3153cc..2f83ac5fe5 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-config/traces-gateway-enabled.sumologic-mock.output.yaml @@ -31,7 +31,7 @@ data: port: 4317 sumologic/metrics: client: k8s_%CURRENT_CHART_VERSION% - compress_encoding: gzip + compression: gzip endpoint: ${SUMO_ENDPOINT_DEFAULT_METRICS_SOURCE} log_format: text max_request_body_size: 1048576 @@ -47,7 +47,8 @@ data: queue_size: 5000 timeout: 5s extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -116,27 +117,27 @@ data: jaeger: protocols: grpc: - endpoint: 0.0.0.0:14250 + endpoint: ${env:MY_POD_IP}:14250 thrift_binary: - endpoint: 0.0.0.0:6832 + endpoint: ${env:MY_POD_IP}:6832 thrift_compact: - endpoint: 0.0.0.0:6831 + endpoint: ${env:MY_POD_IP}:6831 thrift_http: - endpoint: 0.0.0.0:14268 + endpoint: ${env:MY_POD_IP}:14268 opencensus: - endpoint: 0.0.0.0:55678 + endpoint: ${env:MY_POD_IP}:55678 otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 otlp/deprecated: protocols: http: - endpoint: 0.0.0.0:55681 + endpoint: ${env:MY_POD_IP}:55681 zipkin: - endpoint: 0.0.0.0:9411 + endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/basic.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/basic.output.yaml index 6cda67636d..1dcfb7b7bc 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/basic.output.yaml @@ -57,7 +57,7 @@ spec: fsGroup: 999 containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - "--config=/conf/otelcol.instrumentation.conf.yaml" @@ -117,3 +117,9 @@ spec: secretKeyRef: name: sumologic key: endpoint-metrics + + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP diff --git a/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/custom.output.yaml b/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/custom.output.yaml index fb78e7d4a8..f354ffdc25 100644 --- a/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/otelcol-instrumentation-statefulset/custom.output.yaml @@ -118,3 +118,9 @@ spec: secretKeyRef: name: sumologic key: endpoint-metrics + + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP diff --git a/tests/helm/testdata/goldenfile/setup/basic.output.yaml b/tests/helm/testdata/goldenfile/setup/basic.output.yaml index d8b9034d8c..799541307c 100644 --- a/tests/helm/testdata/goldenfile/setup/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/basic.output.yaml @@ -14,12 +14,14 @@ metadata: chart: "sumologic-%CURRENT_CHART_VERSION%" release: "RELEASE-NAME" heritage: "Helm" + sumologic.com/app: "setup" spec: ttlSecondsAfterFinished: 120 template: metadata: annotations: labels: + sumologic.com/app: "setup" spec: restartPolicy: OnFailure serviceAccountName: RELEASE-NAME-sumologic-setup diff --git a/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml index a74f846af9..b4037e20b7 100644 --- a/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml @@ -14,12 +14,14 @@ metadata: chart: "sumologic-%CURRENT_CHART_VERSION%" release: "RELEASE-NAME" heritage: "Helm" + sumologic.com/app: "setup" spec: ttlSecondsAfterFinished: 120 template: metadata: annotations: labels: + sumologic.com/app: "setup" spec: restartPolicy: OnFailure serviceAccountName: RELEASE-NAME-sumologic-setup diff --git a/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml index 03ee27dcae..454042e9f4 100644 --- a/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml @@ -14,12 +14,14 @@ metadata: chart: "sumologic-%CURRENT_CHART_VERSION%" release: "RELEASE-NAME" heritage: "Helm" + sumologic.com/app: "setup" spec: ttlSecondsAfterFinished: 120 template: metadata: annotations: labels: + sumologic.com/app: "setup" spec: restartPolicy: OnFailure serviceAccountName: RELEASE-NAME-sumologic-setup diff --git a/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml b/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml index 9249f0e937..080e9b9422 100644 --- a/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml @@ -14,12 +14,14 @@ metadata: chart: "sumologic-%CURRENT_CHART_VERSION%" release: "RELEASE-NAME" heritage: "Helm" + sumologic.com/app: "setup" spec: ttlSecondsAfterFinished: 120 template: metadata: annotations: labels: + sumologic.com/app: "setup" spec: restartPolicy: OnFailure serviceAccountName: RELEASE-NAME-sumologic-setup diff --git a/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml index 9249f0e937..080e9b9422 100644 --- a/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml @@ -14,12 +14,14 @@ metadata: chart: "sumologic-%CURRENT_CHART_VERSION%" release: "RELEASE-NAME" heritage: "Helm" + sumologic.com/app: "setup" spec: ttlSecondsAfterFinished: 120 template: metadata: annotations: labels: + sumologic.com/app: "setup" spec: restartPolicy: OnFailure serviceAccountName: RELEASE-NAME-sumologic-setup diff --git a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml index d0da22310d..a32a0e408d 100644 --- a/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/all_fields.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml index 31e93f72a5..7023674cfe 100644 --- a/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/collector_fields.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml index ab0ec7e48a..05e4267db2 100644 --- a/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/conditional_sources.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml index ab0ec7e48a..05e4267db2 100644 --- a/tests/helm/testdata/goldenfile/terraform/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/custom.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/default.output.yaml b/tests/helm/testdata/goldenfile/terraform/default.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/default.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/default.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml index 05f53e6028..180a9068c1 100644 --- a/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disable_default_metrics.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_dashboards.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/disabled_monitors.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml index e2a526c39e..be1e22e8a1 100644 --- a/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/logs_fields.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_email_notifications.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/monitors_with_single_email.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml index dc3f212aa3..2627425448 100644 --- a/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/strip_extrapolation.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml index 790d531edf..fe6323bd86 100644 --- a/tests/helm/testdata/goldenfile/terraform/traces.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/traces.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml index 26f5d72c9f..2352e9bf1f 100644 --- a/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml +++ b/tests/helm/testdata/goldenfile/terraform/tracing-metrics-disabled.output.yaml @@ -305,7 +305,7 @@ data: # extract environment from SUMOLOGIC_BASE_URL # see: https://help.sumologic.com/docs/api/getting-started/#sumo-logic-endpoints-by-deployment-and-firewall-security - SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)\.sumologic\.com.*/\1/' ) + SUMOLOGIC_ENV=$( echo "${SUMOLOGIC_BASE_URL}" | sed -E 's/https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)\.sumologic\.com.*/\1/' ) if [[ "${SUMOLOGIC_BASE_URL}" == "${SUMOLOGIC_ENV}" ]] ; then SUMOLOGIC_ENV="us1" fi @@ -400,7 +400,7 @@ data: | grep -Fi location )" if [[ ! ${OPTIONAL_REDIRECTION} =~ ^\s*$ ]]; then - BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|us2)?\.sumologic\.com\/api\/).*/\1/' ) + BASE_URL=$( echo "${OPTIONAL_REDIRECTION}" | sed -E 's/.*: (https:\/\/.*(au|ca|de|eu|fed|in|jp|kr|us2)?\.sumologic\.com\/api\/).*/\1/' ) fi BASE_URL=${BASE_URL%v1*} diff --git a/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml index b8c7f3bc61..6963d5bcf3 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-deployment/basic.output.yaml @@ -37,7 +37,7 @@ spec: restartPolicy: Always containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - "--config=/conf/traces.gateway.conf.yaml" @@ -63,6 +63,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP resources: limits: cpu: 1000m diff --git a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml index e098dad310..52cd5c3bb7 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-deployment/custom.output.yaml @@ -59,6 +59,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP resources: limits: cpu: 1000m diff --git a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-merge.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-merge.output.yaml index bab28f5ba2..b537090b50 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-merge.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-merge.output.yaml @@ -28,7 +28,8 @@ data: hostname: RELEASE-NAME-sumologic-traces-sampler-headless.sumologic port: 4317 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 256 pprof: {} @@ -45,9 +46,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-values-backward-compatibility.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-values-backward-compatibility.output.yaml index 1bdd38100a..f2d99cedb4 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-values-backward-compatibility.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/config-from-values-backward-compatibility.output.yaml @@ -1,6 +1,5 @@ --- # Source: sumologic/templates/instrumentation/traces-gateway/configmap.yaml -# Just a part of the config is present here for test purposes. In practice whole config from values.yaml should be a content. apiVersion: v1 kind: ConfigMap metadata: @@ -29,7 +28,8 @@ data: hostname: RELEASE-NAME-sumologic-traces-sampler-headless.sumologic port: 4317 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -46,9 +46,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/sumologic-mock.output.yaml index 818b8c4b7a..4b0e008039 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/sumologic-mock.output.yaml @@ -30,7 +30,8 @@ data: hostname: RELEASE-NAME-sumologic-traces-sampler-headless.sumologic port: 4317 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -47,9 +48,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/traces-gateway-true.output.yaml b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/traces-gateway-true.output.yaml index 9344ae44bd..33e3adee0d 100644 --- a/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/traces-gateway-true.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-gateway-loadbalancing/traces-gateway-true.output.yaml @@ -28,7 +28,8 @@ data: hostname: RELEASE-NAME-sumologic-traces-sampler-headless.sumologic port: 4317 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -45,9 +46,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml index 3d2365a5bf..b19797d862 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/basic.output.yaml @@ -32,7 +32,7 @@ spec: kubernetes.io/os: linux containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/conf/traces.sampler.conf.yaml @@ -52,6 +52,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP resources: limits: cpu: 2000m diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml index a65051a830..348a7b4fbf 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/custom.output.yaml @@ -47,6 +47,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP resources: limits: cpu: 2000m diff --git a/tests/helm/testdata/goldenfile/traces-sampler-deployment/persistence-enabled.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler-deployment/persistence-enabled.output.yaml index d646fd16bd..8ae1061050 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler-deployment/persistence-enabled.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler-deployment/persistence-enabled.output.yaml @@ -32,7 +32,7 @@ spec: kubernetes.io/os: linux containers: - name: otelcol - image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.102.1-sumo-0" + image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.104.0-sumo-1" imagePullPolicy: IfNotPresent args: - --config=/conf/traces.sampler.conf.yaml @@ -52,6 +52,11 @@ spec: - name: NO_PROXY value: kubernetes.default.svc + - name: MY_POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP resources: limits: cpu: 2000m diff --git a/tests/helm/testdata/goldenfile/traces-sampler/config-from-merge.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/config-from-merge.output.yaml index 06f0d72316..1d1edd7dd5 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/config-from-merge.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/config-from-merge.output.yaml @@ -21,7 +21,8 @@ data: num_consumers: 10 queue_size: 10000 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 512 pprof: {} @@ -40,9 +41,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler/config-from-values-backward-compatibility.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/config-from-values-backward-compatibility.output.yaml index c1682e797e..a4f419f0d3 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/config-from-values-backward-compatibility.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/config-from-values-backward-compatibility.output.yaml @@ -1,6 +1,5 @@ --- # Source: sumologic/templates/instrumentation/traces-sampler/configmap.yaml -# Just a part of the config is present here for test purposes. In practice whole config from values.yaml should be a content. apiVersion: v1 kind: ConfigMap metadata: @@ -22,7 +21,8 @@ data: num_consumers: 10 queue_size: 10000 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 683 pprof: {} @@ -41,9 +41,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler/httpendpoint.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/httpendpoint.output.yaml index 924f8f8f2e..c4adc816a3 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/httpendpoint.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/httpendpoint.output.yaml @@ -21,7 +21,8 @@ data: queue_size: 10000 traces_endpoint: ${SUMO_ENDPOINT_DEFAULT_TRACES_SOURCE} extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 683 pprof: {} @@ -40,9 +41,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler/persistence-enabled.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/persistence-enabled.output.yaml index 754a00448c..73a012619c 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/persistence-enabled.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/persistence-enabled.output.yaml @@ -28,7 +28,8 @@ data: on_rebound: true directory: /var/lib/storage/tracessampler timeout: 10s - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 683 pprof: {} @@ -47,9 +48,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml index 3221c7cf29..72fc82bdbd 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/simple.output.yaml @@ -21,7 +21,8 @@ data: num_consumers: 10 queue_size: 10000 extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 683 pprof: {} @@ -40,9 +41,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/helm/testdata/goldenfile/traces-sampler/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/traces-sampler/sumologic-mock.output.yaml index f71f119a18..ab4856f783 100644 --- a/tests/helm/testdata/goldenfile/traces-sampler/sumologic-mock.output.yaml +++ b/tests/helm/testdata/goldenfile/traces-sampler/sumologic-mock.output.yaml @@ -26,7 +26,8 @@ data: compression: gzip endpoint: http://RELEASE-NAME-sumologic-mock.sumologic.svc.cluster.local.:3000/receiver extensions: - health_check: {} + health_check: + endpoint: ${env:MY_POD_IP}:13133 memory_ballast: size_mib: 683 pprof: {} @@ -45,9 +46,9 @@ data: otlp: protocols: grpc: - endpoint: 0.0.0.0:4317 + endpoint: ${env:MY_POD_IP}:4317 http: - endpoint: 0.0.0.0:4318 + endpoint: ${env:MY_POD_IP}:4318 service: extensions: - health_check diff --git a/tests/integration/features.go b/tests/integration/features.go index 3196a082cb..0e78a411c5 100644 --- a/tests/integration/features.go +++ b/tests/integration/features.go @@ -134,7 +134,6 @@ func GetMetricsFeature(expectedMetrics []string, metricsCollector MetricsCollect expectedLabels = addCollectorSpecificMetricLabels(expectedLabels, releaseName, namespace, metricsCollector) // drop some unnecessary labels delete(expectedLabels, "prometheus_service") - return stepfuncs.WaitUntilExpectedMetricLabelsPresent(metricFilters, expectedLabels, waitDuration, tickDuration)(ctx, t, envConf) }, ). @@ -245,7 +244,10 @@ func addCollectorSpecificMetricLabels(labels sumologicmock.Labels, releaseName s "prometheus_service": fmt.Sprintf("%s-.*-kubelet", releaseName), } otelcolLabels := sumologicmock.Labels{ - "_collector": "kubernetes", + "_collector": "kubernetes", + "server.address": ".*", + "server.port": ".*", + "url.scheme": ".*", } if collector == Prometheus { diff --git a/tests/integration/helm_ot_histograms_test.go b/tests/integration/helm_ot_histograms_test.go new file mode 100644 index 0000000000..8d2703a831 --- /dev/null +++ b/tests/integration/helm_ot_histograms_test.go @@ -0,0 +1,47 @@ +//go:build allversions +// +build allversions + +package integration + +import ( + "testing" + + "github.com/SumoLogic/sumologic-kubernetes-collection/tests/integration/internal" + "github.com/SumoLogic/sumologic-kubernetes-collection/tests/integration/internal/stepfuncs" +) + +func Test_Helm_OT_Histograms(t *testing.T) { + + expectedMetrics := internal.DefaultExpectedMetrics + histogramMetrics := internal.KubeApiHistogramMetrics + // we have tracing enabled, so check tracing-specific metrics + expectedMetrics = append(expectedMetrics, internal.TracingOtelcolMetrics...) + // we expect the _bucket metrics for the histogram + expectedMetrics = append(expectedMetrics, histogramMetrics...) + + installChecks := []featureCheck{ + CheckSumologicSecret(15), + CheckOtelcolMetadataLogsInstall, + CheckOtelcolMetadataMetricsInstall, + CheckOtelcolEventsInstall, + CheckOtelcolMetricsCollectorInstall, + CheckOtelcolLogsCollectorInstall, + CheckTracesInstall, + } + + featInstall := GetInstallFeature(installChecks) + + featMetrics := GetMetricsFeature(expectedMetrics, Otelcol) + + featTelegrafMetrics := GetTelegrafMetricsFeature(internal.DefaultExpectedNginxAnnotatedMetrics, Otelcol, true) + + featLogs := GetAllLogsFeature(stepfuncs.WaitUntilExpectedExactLogsPresent, true) + + featMultilineLogs := GetMultipleMultilineLogsFeature() + + featEvents := GetEventsFeature() + + featTraces := GetTracesFeature() + + testenv.Test(t, featInstall, featMetrics, featTelegrafMetrics, featLogs, featMultilineLogs, featEvents, featTraces) +} diff --git a/tests/integration/internal/constants.go b/tests/integration/internal/constants.go index 91bbb0ec55..cbbd2d8e50 100644 --- a/tests/integration/internal/constants.go +++ b/tests/integration/internal/constants.go @@ -89,6 +89,11 @@ var ( "kube_statefulset_status_replicas", "kube_statefulset_replicas", "kube_statefulset_metadata_generation", + "kube_horizontalpodautoscaler_status_desired_replicas", + "kube_horizontalpodautoscaler_status_current_replicas", + "kube_horizontalpodautoscaler_status_condition", + "kube_horizontalpodautoscaler_spec_min_replicas", + "kube_horizontalpodautoscaler_spec_max_replicas", } KubeDaemonSetMetrics = []string{ "kube_daemonset_status_current_number_scheduled", // used by Kubernetes App @@ -140,6 +145,9 @@ var ( "apiserver_request_duration_seconds_count", // not used by any App "apiserver_request_duration_seconds_sum", // not used by any App } + KubeApiHistogramMetrics = []string{ + "apiserver_request_duration_seconds_bucket", + } KubeEtcdMetrics = []string{ // used by Kubernetes - Control Plane "etcd_mvcc_db_total_size_in_bytes", // not used by any App "etcd_debugging_store_expires_total", @@ -233,6 +241,7 @@ var ( "otelcol_otelsvc_k8s_pod_table_size", "otelcol_otelsvc_k8s_pod_updated", "otelcol_processor_accepted_metric_points", + "otelcol_processor_inserted_metric_points", "otelcol_processor_batch_batch_send_size_count", "otelcol_processor_batch_batch_send_size_sum", "otelcol_processor_batch_timeout_trigger_send", @@ -252,6 +261,7 @@ var ( "otelcol_processor_filter_logs_filtered", "otelcol_receiver_accepted_log_records", "otelcol_processor_accepted_log_records", + "otelcol_processor_inserted_log_records", "otelcol_receiver_refused_log_records", "otelcol_processor_refused_log_records", "otelcol_processor_dropped_log_records", diff --git a/tests/integration/values/values_helm_ot_histograms.yaml b/tests/integration/values/values_helm_ot_histograms.yaml new file mode 100644 index 0000000000..6d3942ee37 --- /dev/null +++ b/tests/integration/values/values_helm_ot_histograms.yaml @@ -0,0 +1,3 @@ +sumologic: + metrics: + allowHistogramRegex: "^(apiserver_request_duration_seconds)$"