*: update-lint

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
Damien Grisonnet 2024-05-03 17:07:21 +02:00
parent d3784c5725
commit 1d31a46aa1
2 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ TAG_PREFIX=v
TAG?=$(TAG_PREFIX)$(VERSION) TAG?=$(TAG_PREFIX)$(VERSION)
GO_VERSION?=1.22.2 GO_VERSION?=1.22.2
GOLANGCI_VERSION?=1.53.2 GOLANGCI_VERSION?=1.56.2
.PHONY: all .PHONY: all
all: prometheus-adapter all: prometheus-adapter

View file

@ -106,12 +106,12 @@ func waitForPrometheusReady(ctx context.Context, namespace string, name string)
return false, err return false, err
} }
var reconciled, available *monitoringv1.PrometheusCondition var reconciled, available *monitoringv1.Condition
for _, condition := range prom.Status.Conditions { for _, condition := range prom.Status.Conditions {
cond := condition cond := condition
if cond.Type == monitoringv1.PrometheusReconciled { if cond.Type == monitoringv1.Reconciled {
reconciled = &cond reconciled = &cond
} else if cond.Type == monitoringv1.PrometheusAvailable { } else if cond.Type == monitoringv1.Available {
available = &cond available = &cond
} }
} }
@ -120,7 +120,7 @@ func waitForPrometheusReady(ctx context.Context, namespace string, name string)
log.Printf("Prometheus instance '%s': Waiting for reconciliation status...", name) log.Printf("Prometheus instance '%s': Waiting for reconciliation status...", name)
return false, nil return false, nil
} }
if reconciled.Status != monitoringv1.PrometheusConditionTrue { if reconciled.Status != monitoringv1.ConditionTrue {
log.Printf("Prometheus instance '%s': Reconciiled = %v. Waiting for reconciliation (reason %s, %q)...", name, reconciled.Status, reconciled.Reason, reconciled.Message) log.Printf("Prometheus instance '%s': Reconciiled = %v. Waiting for reconciliation (reason %s, %q)...", name, reconciled.Status, reconciled.Reason, reconciled.Message)
return false, nil return false, nil
} }
@ -136,7 +136,7 @@ func waitForPrometheusReady(ctx context.Context, namespace string, name string)
log.Printf("Prometheus instance '%s': Waiting for Available status...", name) log.Printf("Prometheus instance '%s': Waiting for Available status...", name)
return false, nil return false, nil
} }
if available.Status != monitoringv1.PrometheusConditionTrue { if available.Status != monitoringv1.ConditionTrue {
log.Printf("Prometheus instance '%s': Available = %v. Waiting for Available status... (reason %s, %q)", name, available.Status, available.Reason, available.Message) log.Printf("Prometheus instance '%s': Available = %v. Waiting for Available status... (reason %s, %q)", name, available.Status, available.Reason, available.Message)
return false, nil return false, nil
} }