From f5df2a01d2700d0206ad7f903dccdd3f03182006 Mon Sep 17 00:00:00 2001 From: Zirko <64951262+QuantumEnigmaa@users.noreply.github.com> Date: Wed, 29 May 2024 16:45:16 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Quentin Bisson --- pkg/monitoring/mimir/service.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/monitoring/mimir/service.go b/pkg/monitoring/mimir/service.go index 9e35e001..7ec2f1ee 100644 --- a/pkg/monitoring/mimir/service.go +++ b/pkg/monitoring/mimir/service.go @@ -28,13 +28,14 @@ type MimirService struct { SecretManager secret.Manager } +// ConfigureMimir configures the ingress and its authentication (basic auth) to allow prometheus agents to send their data to Mimir func (ms *MimirService) ConfigureMimir(ctx context.Context, mc string) error { logger := log.FromContext(ctx).WithValues("cluster", mc) - logger.Info("ensuring mimir config") + logger.Info("configuring mimir ingress") err := ms.CreateAuthSecret(ctx, logger, mc) if err != nil { - logger.Error(err, "failed to create mimit auth secret") + logger.Error(err, "failed to create mimir auth secret") return errors.WithStack(err) } @@ -44,7 +45,7 @@ func (ms *MimirService) ConfigureMimir(ctx context.Context, mc string) error { return errors.WithStack(err) } - logger.Info("ensured mimir config") + logger.Info("configured mimir ingress") return nil } @@ -97,7 +98,6 @@ func (ms *MimirService) CreateIngressSecret(ctx context.Context, mc string, logg current := &corev1.Secret{} err := ms.Client.Get(ctx, objectKey, current) if apierrors.IsNotFound(err) { - // CREATE SECRET logger.Info("building ingress secret") password, err := prometheusagent.GetMimirIngressPassword(ctx)