Skip to content

Commit

Permalink
removes unused logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Disper committed Dec 4, 2023
1 parent 2ed34c1 commit eec2f69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/controller/gardener_cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func loggingContext(req ctrl.Request) []any {
}

func (controller *GardenerClusterController) resultWithRequeue(cluster *imv1.GardenerCluster) ctrl.Result {
metrics.SetGardenerClusterStates(*cluster, controller.log)
metrics.SetGardenerClusterStates(*cluster)

return ctrl.Result{
Requeue: true,
Expand All @@ -146,7 +146,7 @@ func (controller *GardenerClusterController) resultWithRequeue(cluster *imv1.Gar
}

func (controller *GardenerClusterController) resultWithoutRequeue(cluster *imv1.GardenerCluster) ctrl.Result { //nolint:unparam
metrics.SetGardenerClusterStates(*cluster, controller.log)
metrics.SetGardenerClusterStates(*cluster)
return ctrl.Result{}
}

Expand Down
3 changes: 1 addition & 2 deletions internal/controller/metrics/metrics.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package metrics

import (
"github.com/go-logr/logr"
v1 "github.com/kyma-project/infrastructure-manager/api/v1"
"github.com/prometheus/client_golang/prometheus"
ctrlMetrics "sigs.k8s.io/controller-runtime/pkg/metrics"
Expand Down Expand Up @@ -38,6 +37,6 @@ func IncrementReconciliationLoopsStarted() {
playgroundTotalReconciliationLoopsStarted.Inc()
}

func SetGardenerClusterStates(cluster v1.GardenerCluster, log logr.Logger) {
func SetGardenerClusterStates(cluster v1.GardenerCluster) {
metricGardenerClustersState.WithLabelValues(cluster.Spec.Shoot.Name, string(cluster.Status.State)).Set(1)
}

0 comments on commit eec2f69

Please sign in to comment.