From 19f2bbbff39a767900e5321c4530bc7dece7311d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=A1gr?= Date: Mon, 14 Oct 2024 22:35:41 +0200 Subject: [PATCH] Fixes for KSM - add KSM imate to telemetrydefaults webhook - remove image version from labels, because in some cases it can exceed maximum lenght of value --- api/v1beta1/telemetry_webhook.go | 4 ++++ pkg/availability/statefulset.go | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/v1beta1/telemetry_webhook.go b/api/v1beta1/telemetry_webhook.go index f8cd4cbd..abac6e23 100644 --- a/api/v1beta1/telemetry_webhook.go +++ b/api/v1beta1/telemetry_webhook.go @@ -35,6 +35,7 @@ type TelemetryDefaults struct { SgCoreContainerImageURL string ProxyContainerImageURL string IpmiContainerImageURL string + KsmContainerImageURL string AodhAPIContainerImageURL string AodhEvaluatorContainerImageURL string AodhNotifierContainerImageURL string @@ -90,6 +91,9 @@ func (spec *TelemetrySpec) Default() { if spec.Ceilometer.CeilometerSpec.ProxyImage == "" { spec.Ceilometer.CeilometerSpec.ProxyImage = telemetryDefaults.ProxyContainerImageURL } + if spec.Ceilometer.CeilometerSpec.KSMImage == "" { + spec.Ceilometer.CeilometerSpec.KSMImage = telemetryDefaults.KsmContainerImageURL + } if spec.Autoscaling.AutoscalingSpec.Aodh.APIImage == "" { spec.Autoscaling.AutoscalingSpec.Aodh.APIImage = telemetryDefaults.AodhAPIContainerImageURL } diff --git a/pkg/availability/statefulset.go b/pkg/availability/statefulset.go index 14e1efe2..b8783152 100644 --- a/pkg/availability/statefulset.go +++ b/pkg/availability/statefulset.go @@ -19,7 +19,6 @@ package availability import ( "fmt" "path/filepath" - "strings" "k8s.io/utils/ptr" @@ -74,7 +73,6 @@ func KSMStatefulSet( labels["app.kubernetes.io/component"] = "exporter" labels["app.kubernetes.io/name"] = KSMServiceName - labels["app.kubernetes.io/version"] = instance.Spec.KSMImage[strings.LastIndex(instance.Spec.KSMImage, ":")+1:] // kube-state-metrics relevant default arguments args := []string{