From 4ab80deff47514a4525bacbdc46817f2d0b8a806 Mon Sep 17 00:00:00 2001 From: Pavel Okhlopkov Date: Tue, 19 May 2026 20:40:43 +0300 Subject: [PATCH] klient metrics fix Signed-off-by: Pavel Okhlopkov --- pkg/shell-operator/bootstrap.go | 2 +- pkg/shell-operator/kube_client.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/shell-operator/bootstrap.go b/pkg/shell-operator/bootstrap.go index e3928c3e..d1313488 100644 --- a/pkg/shell-operator/bootstrap.go +++ b/pkg/shell-operator/bootstrap.go @@ -107,7 +107,7 @@ func Init(ctx context.Context, cfg *app.Config, logger *log.Logger) (*ShellOpera QPS: cfg.ObjectPatcher.KubeClientQPS, Burst: cfg.ObjectPatcher.KubeClientBurst, Timeout: cfg.ObjectPatcher.KubeClientTimeout, - MetricPrefix: cfg.App.PrometheusMetricsPrefix, + MetricPrefix: "object_patcher_", }) if err != nil { logger.Log(ctx, log.LevelFatal.Level(), "essemble common operator", log.Err(err)) diff --git a/pkg/shell-operator/kube_client.go b/pkg/shell-operator/kube_client.go index 266bcc2a..98c9ca29 100644 --- a/pkg/shell-operator/kube_client.go +++ b/pkg/shell-operator/kube_client.go @@ -40,6 +40,7 @@ func defaultMainKubeClient(cfg KubeClientConfig, metricStorage metricsstorage.St client.WithMetricStorage(metric.NewMetricsAdapter(metricStorage, logger.Named("kube-client-metrics-adapter"))) client.WithMetricLabels(utils.DefaultIfEmpty(metricLabels, defaultMainKubeClientMetricLabels)) client.WithMetricPrefix(cfg.MetricPrefix) + return client }