Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Quentin Bisson <[email protected]>
  • Loading branch information
QuantumEnigmaa and QuentinBisson authored May 29, 2024
1 parent a8fac5e commit f5df2a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/monitoring/mimir/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f5df2a0

Please sign in to comment.