From d22faf6da419083e22418813a76efdca30c1c8af Mon Sep 17 00:00:00 2001 From: Tiffany Pei Date: Tue, 14 Jan 2025 22:46:24 +0000 Subject: [PATCH] Resume label_set to empty array as bug was fixed in upstream after 0.112.0 --- Makefile | 2 +- pkg/metrics/otel.go | 22 +++++-------------- .../controllers/otel_controller_test.go | 2 +- test/kustomization/expected.yaml | 17 -------------- 4 files changed, 8 insertions(+), 35 deletions(-) diff --git a/Makefile b/Makefile index 09651daeec..2a2db5daa4 100644 --- a/Makefile +++ b/Makefile @@ -89,7 +89,7 @@ COSIGN := $(BIN_DIR)/cosign GIT_SYNC_VERSION := v4.3.0-gke.4__linux_amd64 GIT_SYNC_IMAGE_NAME := gcr.io/config-management-release/git-sync:$(GIT_SYNC_VERSION) -OTELCONTRIBCOL_VERSION := v0.115.0-gke.0 +OTELCONTRIBCOL_VERSION := v0.117.0-gke.0 # TODO: This version needs to be updated build with the correct base image and configured ports. OTELCONTRIBCOL_IMAGE_NAME := gcr.io/config-management-release/otelcontribcol:$(OTELCONTRIBCOL_VERSION) # Directory used for staging Docker contexts. diff --git a/pkg/metrics/otel.go b/pkg/metrics/otel.go index f1a0ff3391..78dd96835b 100644 --- a/pkg/metrics/otel.go +++ b/pkg/metrics/otel.go @@ -185,9 +185,7 @@ processors: new_name: current_declared_resources operations: - action: aggregate_labels - # Using a no_op_label to get around issue in the upstream - # https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34430 - label_set: [no_op_label] + label_set: [] aggregation_type: max - include: kcc_resource_count action: update @@ -258,18 +256,14 @@ processors: new_name: resource_conflicts_count operations: - action: aggregate_labels - # Using a no_op_label to get around issue in the upstream - # https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34430 - label_set: [no_op_label] + label_set: [] aggregation_type: max - include: internal_errors_total action: update new_name: internal_errors_count operations: - action: aggregate_labels - # Using a no_op_label to get around issue in the upstream - # https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34430 - label_set: [no_op_label] + label_set: [] aggregation_type: max - include: remediate_duration_seconds action: update @@ -329,21 +323,17 @@ processors: action: update operations: - action: aggregate_labels - # Using a no_op_label to get around issue in the upstream - # https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34430 - label_set: [no_op_label] + label_set: [] aggregation_type: max - include: kustomize_build_latency action: update operations: - action: aggregate_labels - # Using a no_op_label to get around issue in the upstream - # https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34430 - label_set: [no_op_label] + label_set: [] aggregation_type: max extensions: health_check: - endpoint: "0.0.0.0:13133" + endpoint: 0.0.0.0:13133 service: extensions: [health_check] pipelines: diff --git a/pkg/reconcilermanager/controllers/otel_controller_test.go b/pkg/reconcilermanager/controllers/otel_controller_test.go index 8b785c56ec..3a504eaa93 100644 --- a/pkg/reconcilermanager/controllers/otel_controller_test.go +++ b/pkg/reconcilermanager/controllers/otel_controller_test.go @@ -49,7 +49,7 @@ const ( // otel-collector ConfigMap. // See `CollectorConfigGooglecloud` in `pkg/metrics/otel.go` // Used by TestOtelReconcilerGooglecloud. - depAnnotationGooglecloud = "5e22170ef10a382f587d3d7595fdaebc" + depAnnotationGooglecloud = "e2fc77f25de5df75866195ff0d00f6df" // depAnnotationGooglecloud is the expected hash of the custom // otel-collector ConfigMap test artifact. // Used by TestOtelReconcilerCustom. diff --git a/test/kustomization/expected.yaml b/test/kustomization/expected.yaml index d7932ce205..2659754e0c 100644 --- a/test/kustomization/expected.yaml +++ b/test/kustomization/expected.yaml @@ -6538,23 +6538,6 @@ spec: name: resource-group-otel-agent name: otel-agent-config-vol --- -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: allow-port-ingress - namespace: config-management-monitoring -spec: - ingress: - - from: - - namespaceSelector: {} - ports: - - port: 55678 - protocol: TCP - podSelector: - matchLabels: - app: opentelemetry - component: otel-collector ---- apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: