diff --git a/CHANGELOG.md b/CHANGELOG.md index a9a4666eed..a440ca1fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,6 @@ ### 🛑 Breaking changes 🛑 -- `collector`: The new collector release enables `component.UseLocalHostAsDefaultHost` by default. This mainly affects the `otlpreceiver`. But may has side effects on components like the `healthcheck extension`. The `operator` will change IPs not explicitly configured in the `otlpreceiver` configuration such as `:4317` or empty fields to `0.0.0.0` during the upgrade routine and when creating a CR. More details in the [OpenTelemetry Collector Changelog](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#v1110v01040). - `opamp`: Adds support for v1beta1 OpenTelemetry Collector API in the OpAMP Bridge (#2985) This change adds support for the OpAMP Bridge to manage and apply OpenTelemetry Collectors using the v1beta1 API in the OpAMP Bridge. This change removes support for applying OpenTelemetry Collectors using the v1alpha1 API version. @@ -15,7 +14,7 @@ ### 💡 Enhancements 💡 -- `collector`: set correct target port in services created based on the given otel config. (#3139) +- `operator`: Disables `component.UseLocalHostAsDefaultHost` by default (#3139) - `collector`: Changes the default parser to silently fail. (#3133) - `collector, target allocator`: If the target allocator is enabled, the collector featuregate `confmap.unifyEnvVarExpansion' is disabled. (#3119) - `operator`: Release leader election lease on exit (#3058) diff --git a/apis/v1beta1/collector_webhook.go b/apis/v1beta1/collector_webhook.go index 06e932dbe4..7ba5c823f2 100644 --- a/apis/v1beta1/collector_webhook.go +++ b/apis/v1beta1/collector_webhook.go @@ -79,13 +79,8 @@ func (c CollectorWebhook) Default(_ context.Context, obj runtime.Object) error { otelcol.Spec.TargetAllocator.Replicas = &one } - if otelcol.Spec.TargetAllocator.Enabled { - TAUnifyEnvVarExpansion(otelcol) - } - - if err := DefaultOTLPAddress(otelcol); err != nil { - return err - } + TAUnifyEnvVarExpansion(otelcol) + ComponentUseLocalHostAsDefaultHost(otelcol) if otelcol.Spec.Autoscaler != nil && otelcol.Spec.Autoscaler.MaxReplicas != nil { if otelcol.Spec.Autoscaler.MinReplicas == nil { @@ -476,64 +471,35 @@ func TAUnifyEnvVarExpansion(otelcol *OpenTelemetryCollector) { const ( baseFlag = "feature-gates" - fgFlag = "-confmap.unifyEnvVarExpansion" + fgFlag = "confmap.unifyEnvVarExpansion" ) if otelcol.Spec.Args == nil { otelcol.Spec.Args = make(map[string]string) } args, ok := otelcol.Spec.Args[baseFlag] if !ok || len(args) == 0 { - otelcol.Spec.Args[baseFlag] = fgFlag + otelcol.Spec.Args[baseFlag] = "-" + fgFlag } else if !strings.Contains(otelcol.Spec.Args[baseFlag], fgFlag) { - otelcol.Spec.Args[baseFlag] += "," + fgFlag + otelcol.Spec.Args[baseFlag] += ",-" + fgFlag } - } -// DefaultOTLPAddress binds configured otlp receivers to 0.0.0.0 if nothing else -// is explicitly defined. -func DefaultOTLPAddress(otelcol *OpenTelemetryCollector) error { - for key, rc := range otelcol.Spec.Config.Receivers.Object { - // check if otel is configured - if !strings.HasPrefix(key, "otlp") { - continue - } - - cfg, ok := rc.(map[string]interface{}) - if !ok { - continue - } - - protocols, ok := cfg["protocols"].(map[string]interface{}) - if !ok { - continue - } - - if _, exists := protocols["grpc"]; exists { - grpcConfig, ok := protocols["grpc"].(map[string]interface{}) - if !ok { - grpcConfig = make(map[string]interface{}) - protocols["grpc"] = grpcConfig - } - - gEndpoint, ok := grpcConfig["endpoint"].(string) - if !ok || !strings.Contains(gEndpoint, ":") { - grpcConfig["endpoint"] = "0.0.0.0:4317" - } - } - - if _, exists := protocols["http"]; exists { - httpConfig, ok := protocols["http"].(map[string]interface{}) - if !ok { - httpConfig = make(map[string]interface{}) - protocols["http"] = httpConfig - } - - hEndpoint, ok := httpConfig["endpoint"].(string) - if !ok || !strings.Contains(hEndpoint, ":") { - httpConfig["endpoint"] = "0.0.0.0:4318" - } - } +// ComponentUseLocalHostAsDefaultHost enables component.UseLocalHostAsDefaultHost +// featuregate on the given collector instance. +// NOTE: For more details, visit: +// https://github.com/open-telemetry/opentelemetry-collector/issues/8510 +func ComponentUseLocalHostAsDefaultHost(otelcol *OpenTelemetryCollector) { + const ( + baseFlag = "feature-gates" + fgFlag = "component.UseLocalHostAsDefaultHost" + ) + if otelcol.Spec.Args == nil { + otelcol.Spec.Args = make(map[string]string) + } + args, ok := otelcol.Spec.Args[baseFlag] + if !ok || len(args) == 0 { + otelcol.Spec.Args[baseFlag] = "-" + fgFlag + } else if !strings.Contains(otelcol.Spec.Args[baseFlag], fgFlag) { + otelcol.Spec.Args[baseFlag] += ",-" + fgFlag } - return nil } diff --git a/apis/v1beta1/collector_webhook_test.go b/apis/v1beta1/collector_webhook_test.go index 85b62932f3..cf28e9cbb6 100644 --- a/apis/v1beta1/collector_webhook_test.go +++ b/apis/v1beta1/collector_webhook_test.go @@ -117,6 +117,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { }, Spec: OpenTelemetryCollectorSpec{ OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, ManagementState: ManagementStateManaged, Replicas: &one, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -152,6 +153,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Mode: ModeSidecar, UpgradeStrategy: "adhoc", OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &five, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -186,6 +188,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Mode: ModeSidecar, UpgradeStrategy: "adhoc", OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &five, ManagementState: ManagementStateUnmanaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -218,6 +221,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Mode: ModeDeployment, UpgradeStrategy: UpgradeStrategyAutomatic, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -254,6 +258,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, ManagementState: ManagementStateManaged, Replicas: &one, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -297,6 +302,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -336,6 +342,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -386,6 +393,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -431,6 +439,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -475,6 +484,7 @@ func TestCollectorDefaultingWebhook(t *testing.T) { Spec: OpenTelemetryCollectorSpec{ Mode: ModeDeployment, OpenTelemetryCommonFields: OpenTelemetryCommonFields{ + Args: map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, Replicas: &one, ManagementState: ManagementStateManaged, PodDisruptionBudget: &PodDisruptionBudgetSpec{ @@ -493,58 +503,6 @@ func TestCollectorDefaultingWebhook(t *testing.T) { }, }, }, - { - name: "default address otlp receiver", - otelcol: OpenTelemetryCollector{ - Spec: OpenTelemetryCollectorSpec{ - Config: Config{ - Receivers: AnyConfig{ - Object: map[string]interface{}{ - "otlp/something": map[string]interface{}{ - "protocols": map[string]interface{}{ - "http": nil, - }, - }, - }, - }, - }, - }, - }, - expected: OpenTelemetryCollector{ - ObjectMeta: metav1.ObjectMeta{ - Labels: map[string]string{ - "app.kubernetes.io/managed-by": "opentelemetry-operator", - }, - }, - Spec: OpenTelemetryCollectorSpec{ - OpenTelemetryCommonFields: OpenTelemetryCommonFields{ - ManagementState: ManagementStateManaged, - Replicas: &one, - PodDisruptionBudget: &PodDisruptionBudgetSpec{ - MaxUnavailable: &intstr.IntOrString{ - Type: intstr.Int, - IntVal: 1, - }, - }, - }, - Config: Config{ - Receivers: AnyConfig{ - Object: map[string]interface{}{ - "otlp/something": map[string]interface{}{ - "protocols": map[string]interface{}{ - "http": map[string]interface{}{ - "endpoint": "0.0.0.0:4318", - }, - }, - }, - }, - }, - }, - Mode: ModeDeployment, - UpgradeStrategy: UpgradeStrategyAutomatic, - }, - }, - }, } for _, test := range tests { diff --git a/pkg/collector/upgrade/v0_104_0.go b/pkg/collector/upgrade/v0_104_0.go index 5546c73718..eafa9036aa 100644 --- a/pkg/collector/upgrade/v0_104_0.go +++ b/pkg/collector/upgrade/v0_104_0.go @@ -26,9 +26,7 @@ func upgrade0_104_0_TA(_ VersionUpgrade, otelcol *v1beta1.OpenTelemetryCollector } func upgrade0_104_0(u VersionUpgrade, otelcol *v1beta1.OpenTelemetryCollector) (*v1beta1.OpenTelemetryCollector, error) { - if err := v1beta1.DefaultOTLPAddress(otelcol); err != nil { - return nil, err - } + v1beta1.ComponentUseLocalHostAsDefaultHost(otelcol) const issueID = "https://github.com/open-telemetry/opentelemetry-collector/issues/8510" warnStr := fmt.Sprintf( diff --git a/pkg/collector/upgrade/v0_104_0_test.go b/pkg/collector/upgrade/v0_104_0_test.go index ecb77c9cfd..22fbd03000 100644 --- a/pkg/collector/upgrade/v0_104_0_test.go +++ b/pkg/collector/upgrade/v0_104_0_test.go @@ -29,7 +29,6 @@ import ( ) func Test0_104_0Upgrade(t *testing.T) { - collectorInstance := v1beta1.OpenTelemetryCollector{ TypeMeta: metav1.TypeMeta{ Kind: "OpenTelemetryCollector", @@ -42,45 +41,7 @@ func Test0_104_0Upgrade(t *testing.T) { Status: v1beta1.OpenTelemetryCollectorStatus{ Version: "0.103.0", }, - Spec: v1beta1.OpenTelemetryCollectorSpec{ - Config: v1beta1.Config{ - Receivers: v1beta1.AnyConfig{ - Object: map[string]interface{}{ - "otlp": map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": nil, - "http": nil, - }, - }, - "otlp/nothing": &v1beta1.AnyConfig{ - Object: map[string]interface{}{ - "protocols": nil, - }, - }, - "otlp/empty": map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": map[string]interface{}{ - "endpoint": "", - }, - "http": map[string]interface{}{ - "endpoint": "", - }, - }, - }, - "otlp/something": map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": map[string]interface{}{ - "endpoint": "123.123.123.123:8642", - }, - "http": map[string]interface{}{ - "endpoint": "123.123.123.123:8642", - }, - }, - }, - }, - }, - }, - }, + Spec: v1beta1.OpenTelemetryCollectorSpec{}, } versionUpgrade := &upgrade.VersionUpgrade{ @@ -90,48 +51,11 @@ func Test0_104_0Upgrade(t *testing.T) { Recorder: record.NewFakeRecorder(upgrade.RecordBufferSize), } - _, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) + col, err := versionUpgrade.ManagedInstance(context.Background(), collectorInstance) if err != nil { t.Errorf("expect err: nil but got: %v", err) } - - assert.EqualValues(t, map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": map[string]interface{}{ - "endpoint": "0.0.0.0:4317", - }, - "http": map[string]interface{}{ - "endpoint": "0.0.0.0:4318", - }, - }, - }, collectorInstance.Spec.Config.Receivers.Object["otlp"], "normal entry is not up-to-date") - - assert.EqualValues(t, &v1beta1.AnyConfig{ - Object: map[string]interface{}{ - "protocols": nil, - }, - }, collectorInstance.Spec.Config.Receivers.Object["otlp/nothing"], "no updated expected") - - assert.EqualValues(t, map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": map[string]interface{}{ - "endpoint": "0.0.0.0:4317", - }, - "http": map[string]interface{}{ - "endpoint": "0.0.0.0:4318", - }, - }, - }, collectorInstance.Spec.Config.Receivers.Object["otlp/empty"], "empty entry is not up-to-date") - - assert.EqualValues(t, map[string]interface{}{ - "protocols": map[string]interface{}{ - "grpc": map[string]interface{}{ - "endpoint": "123.123.123.123:8642", - }, - "http": map[string]interface{}{ - "endpoint": "123.123.123.123:8642", - }, - }, - }, collectorInstance.Spec.Config.Receivers.Object["otlp/something"], "endpoints exist, did not expect an update") - + assert.EqualValues(t, + map[string]string{"feature-gates": "-component.UseLocalHostAsDefaultHost"}, + col.Spec.Args, "missing featuregate") } diff --git a/pkg/collector/upgrade/v0_38_0_test.go b/pkg/collector/upgrade/v0_38_0_test.go index 26e3d69bbb..3d3b3102bb 100644 --- a/pkg/collector/upgrade/v0_38_0_test.go +++ b/pkg/collector/upgrade/v0_38_0_test.go @@ -82,8 +82,9 @@ service: // verify assert.Equal(t, map[string]string{ - "--hii": "hello", - "--arg1": "", + "--hii": "hello", + "--arg1": "", + "feature-gates": "-component.UseLocalHostAsDefaultHost", }, res.Spec.Args) // verify @@ -148,7 +149,8 @@ service: // verify assert.YAMLEq(t, configWithLogging, res.Spec.Config) assert.Equal(t, map[string]string{ - "--hii": "hello", - "--arg1": "", + "--hii": "hello", + "--arg1": "", + "feature-gates": "-component.UseLocalHostAsDefaultHost", }, res.Spec.Args) } diff --git a/pkg/collector/upgrade/v0_43_0_test.go b/pkg/collector/upgrade/v0_43_0_test.go index 348b1d0b96..60ee30f3a5 100644 --- a/pkg/collector/upgrade/v0_43_0_test.go +++ b/pkg/collector/upgrade/v0_43_0_test.go @@ -82,6 +82,7 @@ service: assert.Equal(t, map[string]string{ "--test-upgrade43": "true", "--test-arg1": "otel", + "feature-gates": "-component.UseLocalHostAsDefaultHost", }, res.Spec.Args) // verify @@ -142,6 +143,7 @@ service: assert.Equal(t, map[string]string{ "--test-upgrade43": "true", "--test-arg1": "otel", + "feature-gates": "-component.UseLocalHostAsDefaultHost", }, res.Spec.Args) } diff --git a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml index 6eacda120d..b80944e0c1 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml @@ -46,6 +46,7 @@ spec: - name: otel-apache-conf-dir mountPath: /usr/local/apache2/conf - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml index c99268789a..1e1c7f0fc4 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/01-assert.yaml @@ -72,6 +72,7 @@ spec: - name: OTEL_RESOURCE_ATTRIBUTES name: myrabbit - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml index 62080ceb74..686504f65d 100644 --- a/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-apache-multicontainer/02-assert.yaml @@ -54,6 +54,7 @@ spec: - image: rabbitmq name: myrabbit - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml index 91ecb8117a..62bf4b2d11 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/01-assert.yaml @@ -128,6 +128,7 @@ spec: - mountPath: /otel-auto-instrumentation-dotnet name: opentelemetry-auto-instrumentation-dotnet - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml index dfda236729..2e0a9a5399 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-multicontainer/02-assert.yaml @@ -85,6 +85,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml index 509d5b9854..7d12914698 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet-musl/01-assert.yaml @@ -67,6 +67,7 @@ spec: - mountPath: /otel-auto-instrumentation-dotnet name: opentelemetry-auto-instrumentation-dotnet - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -82,4 +83,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-dotnet ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml index a5dc1fcc92..964cd5cfe4 100644 --- a/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-dotnet/01-assert.yaml @@ -67,6 +67,7 @@ spec: - mountPath: /otel-auto-instrumentation-dotnet name: opentelemetry-auto-instrumentation-dotnet - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -82,4 +83,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-dotnet ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml index cec1654cbe..e5cd59392e 100644 --- a/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-go/02-assert.yaml @@ -11,6 +11,7 @@ spec: containers: - name: productcatalogservice - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container - env: diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml index f48752ff46..30cd157402 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/01-assert.yaml @@ -110,6 +110,7 @@ spec: - mountPath: /otel-auto-instrumentation-java name: opentelemetry-auto-instrumentation-java - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -128,4 +129,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-java ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml index 03c002d2d8..eef9e69105 100644 --- a/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-multicontainer/02-assert.yaml @@ -76,6 +76,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml index d6c440b27f..09da192cf2 100644 --- a/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java-other-ns/03-assert.yaml @@ -59,6 +59,7 @@ spec: - mountPath: /otel-auto-instrumentation-java name: opentelemetry-auto-instrumentation-java - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -74,4 +75,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-java ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml index cd8a8a37fe..c641118364 100644 --- a/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-java/01-assert.yaml @@ -59,6 +59,7 @@ spec: - mountPath: /otel-auto-instrumentation-java name: opentelemetry-auto-instrumentation-java - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml index 1f06f730a1..c465e12eef 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-contnr-secctx/01-assert.yaml @@ -49,6 +49,7 @@ spec: - mountPath: /etc/nginx name: otel-nginx-conf-dir - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -67,4 +68,4 @@ status: ready: true - name: otel-agent-attach-nginx ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml index 8b420b4262..05b5ea6864 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/01-assert.yaml @@ -85,6 +85,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -106,4 +107,4 @@ status: ready: true - name: otel-agent-attach-nginx ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml index 9b0543a336..620fc7d27b 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx-multicontainer/02-assert.yaml @@ -66,6 +66,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml index af808fa3e4..7452263c11 100644 --- a/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nginx/01-assert.yaml @@ -56,6 +56,7 @@ spec: - mountPath: /etc/nginx name: otel-nginx-conf-dir - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -74,4 +75,4 @@ status: ready: true - name: otel-agent-attach-nginx ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml index 7da5c15637..df0652b172 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/01-assert.yaml @@ -100,6 +100,7 @@ spec: - mountPath: /otel-auto-instrumentation-nodejs name: opentelemetry-auto-instrumentation-nodejs - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml index 0738786abd..243f72e7d1 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs-multicontainer/02-assert.yaml @@ -72,6 +72,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml index b228cafc08..f8adfc92db 100644 --- a/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-nodejs/01-assert.yaml @@ -59,6 +59,7 @@ spec: - mountPath: /otel-auto-instrumentation-nodejs name: opentelemetry-auto-instrumentation-nodejs - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -74,4 +75,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-nodejs ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml index 492173d1ab..84507895ad 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/01-assert.yaml @@ -110,6 +110,7 @@ spec: - mountPath: /otel-auto-instrumentation-python name: opentelemetry-auto-instrumentation-python - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -128,4 +129,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-python ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml index 8e136d7f7c..7395299f3c 100644 --- a/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python-multicontainer/02-assert.yaml @@ -76,6 +76,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -94,4 +95,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-python ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml index 722cd5c839..c13213cd98 100644 --- a/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-python/01-assert.yaml @@ -61,6 +61,7 @@ spec: - mountPath: /otel-auto-instrumentation-python name: opentelemetry-auto-instrumentation-python - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -76,4 +77,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-python ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml b/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml index 9046a86d64..4806b8e18e 100644 --- a/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml +++ b/tests/e2e-instrumentation/instrumentation-sdk/01-assert.yaml @@ -45,6 +45,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container status: @@ -55,4 +56,4 @@ status: - name: otc-container ready: true started: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml index 390b702220..2b93ae7019 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-multicontainer/01-assert.yaml @@ -205,6 +205,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: diff --git a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml index fbadd4f5af..747def41f6 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-multi-no-containers/01-assert.yaml @@ -26,6 +26,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container status: diff --git a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml index d9d1801260..390e5e6b21 100644 --- a/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml +++ b/tests/e2e-multi-instrumentation/instrumentation-single-instr-first-container/01-assert.yaml @@ -56,6 +56,7 @@ spec: - mountPath: /var/run/secrets/kubernetes.io/serviceaccount readOnly: true - args: + - --feature-gates=-component.UseLocalHostAsDefaultHost - --config=env:OTEL_CONFIG name: otc-container initContainers: @@ -74,4 +75,4 @@ status: initContainerStatuses: - name: opentelemetry-auto-instrumentation-nodejs ready: true - phase: Running \ No newline at end of file + phase: Running diff --git a/tests/e2e-targetallocator/targetallocator-features/00-assert.yaml b/tests/e2e-targetallocator/targetallocator-features/00-assert.yaml index a31c123118..2516c022ed 100644 --- a/tests/e2e-targetallocator/targetallocator-features/00-assert.yaml +++ b/tests/e2e-targetallocator/targetallocator-features/00-assert.yaml @@ -9,7 +9,7 @@ spec: containers: - args: - --config=/conf/collector.yaml - - --feature-gates=-confmap.unifyEnvVarExpansion + - --feature-gates=-confmap.unifyEnvVarExpansion,-component.UseLocalHostAsDefaultHost name: otc-container volumeMounts: - mountPath: /conf diff --git a/tests/e2e/daemonset-features/02-assert.yaml b/tests/e2e/daemonset-features/02-assert.yaml index 03798dbd6d..ee69351ecf 100644 --- a/tests/e2e/daemonset-features/02-assert.yaml +++ b/tests/e2e/daemonset-features/02-assert.yaml @@ -9,4 +9,5 @@ spec: containers: - args: - --config=/conf/collector.yaml + - --feature-gates=-component.UseLocalHostAsDefaultHost name: otc-container diff --git a/tests/e2e/managed-reconcile/02-assert.yaml b/tests/e2e/managed-reconcile/02-assert.yaml index 0a8f5c29bf..637b3682d0 100644 --- a/tests/e2e/managed-reconcile/02-assert.yaml +++ b/tests/e2e/managed-reconcile/02-assert.yaml @@ -52,7 +52,7 @@ spec: apiVersion: v1 kind: ConfigMap metadata: - name: simplest-collector-a85e451c + name: simplest-collector-ea71c537 data: collector.yaml: | receivers: diff --git a/tests/e2e/multiple-configmaps/00-assert.yaml b/tests/e2e/multiple-configmaps/00-assert.yaml index 54fca05399..b5555b7a90 100644 --- a/tests/e2e/multiple-configmaps/00-assert.yaml +++ b/tests/e2e/multiple-configmaps/00-assert.yaml @@ -25,7 +25,7 @@ spec: volumes: - name: otc-internal configMap: - name: simplest-with-configmaps-collector-a85e451c + name: simplest-with-configmaps-collector-ea71c537 items: - key: collector.yaml path: collector.yaml diff --git a/tests/e2e/statefulset-features/00-assert.yaml b/tests/e2e/statefulset-features/00-assert.yaml index c03d1a24ac..9b5d865a34 100644 --- a/tests/e2e/statefulset-features/00-assert.yaml +++ b/tests/e2e/statefulset-features/00-assert.yaml @@ -9,6 +9,7 @@ spec: containers: - args: - --config=/conf/collector.yaml + - --feature-gates=-component.UseLocalHostAsDefaultHost name: otc-container volumeMounts: - mountPath: /conf diff --git a/tests/e2e/statefulset-features/01-assert.yaml b/tests/e2e/statefulset-features/01-assert.yaml index 79434c1a67..93855eeb85 100644 --- a/tests/e2e/statefulset-features/01-assert.yaml +++ b/tests/e2e/statefulset-features/01-assert.yaml @@ -9,6 +9,7 @@ spec: containers: - args: - --config=/conf/collector.yaml + - --feature-gates=-component.UseLocalHostAsDefaultHost name: otc-container volumeMounts: - mountPath: /conf diff --git a/tests/e2e/versioned-configmaps/00-assert.yaml b/tests/e2e/versioned-configmaps/00-assert.yaml index a1b499db1f..09b5d13d9e 100644 --- a/tests/e2e/versioned-configmaps/00-assert.yaml +++ b/tests/e2e/versioned-configmaps/00-assert.yaml @@ -9,11 +9,11 @@ spec: volumes: - name: otc-internal configMap: - name: simple-collector-bf36603a + name: simple-collector-d6f40475 status: readyReplicas: 1 --- apiVersion: v1 kind: ConfigMap metadata: - name: simple-collector-bf36603a + name: simple-collector-d6f40475 diff --git a/tests/e2e/versioned-configmaps/01-assert.yaml b/tests/e2e/versioned-configmaps/01-assert.yaml index 169568e53a..d480715810 100644 --- a/tests/e2e/versioned-configmaps/01-assert.yaml +++ b/tests/e2e/versioned-configmaps/01-assert.yaml @@ -9,16 +9,16 @@ spec: volumes: - name: otc-internal configMap: - name: simple-collector-024c6417 + name: simple-collector-8cd615bf status: readyReplicas: 1 --- apiVersion: v1 kind: ConfigMap metadata: - name: simple-collector-024c6417 + name: simple-collector-8cd615bf --- apiVersion: v1 kind: ConfigMap metadata: - name: simple-collector-bf36603a + name: simple-collector-d6f40475 diff --git a/tests/e2e/versioned-configmaps/02-error.yaml b/tests/e2e/versioned-configmaps/02-error.yaml index 2b63829a6c..a295b93560 100644 --- a/tests/e2e/versioned-configmaps/02-error.yaml +++ b/tests/e2e/versioned-configmaps/02-error.yaml @@ -2,4 +2,4 @@ apiVersion: v1 kind: ConfigMap metadata: - name: simple-collector-d6f40475 + name: simplest-collector-ea71c537