From d4a20391d0f0136b70bc6e102b198d67e108c867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl?= Date: Fri, 10 Nov 2023 15:46:21 +0100 Subject: [PATCH] fix: probe telemetry configuration --- fleetshard/pkg/central/reconciler/reconciler.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fleetshard/pkg/central/reconciler/reconciler.go b/fleetshard/pkg/central/reconciler/reconciler.go index da59818eb1..21618c4ff1 100644 --- a/fleetshard/pkg/central/reconciler/reconciler.go +++ b/fleetshard/pkg/central/reconciler/reconciler.go @@ -346,14 +346,16 @@ func (r *CentralReconciler) applyTelemetry(remoteCentral *private.ManagedCentral if central.Spec.Central == nil { central.Spec.Central = &v1alpha1.CentralComponentSpec{} } - // Telemetry will only be enabled if the storage key is set _and_ the central is not an "internal" central created - // from internal clients such as probe service or others. - telemetryEnabled := r.telemetry.StorageKey != "" && !remoteCentral.Metadata.Internal + // Telemetry is always enabled, but the key is set to DISABLED for probe and other internal instances. + key := r.telemetry.StorageKey + if remoteCentral.Metadata.Internal { + key = "DISABLED" + } telemetry := &v1alpha1.Telemetry{ - Enabled: pointer.Bool(telemetryEnabled), + Enabled: pointer.Bool(true), Storage: &v1alpha1.TelemetryStorage{ Endpoint: &r.telemetry.StorageEndpoint, - Key: &r.telemetry.StorageKey, + Key: &key, }, } central.Spec.Central.Telemetry = telemetry