Skip to content

Commit 09dfa99

Browse files
committed
Lint
1 parent be6da31 commit 09dfa99

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

pkg/internal/controller/metrics/metrics.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,22 @@ import (
2222
)
2323

2424
var (
25+
// QueueLength is a prometheus metric which counts the current reconcile
26+
// queue length per controller
2527
QueueLength = prometheus.NewGaugeVec(prometheus.GaugeOpts{
2628
Name: "controller_runtime_reconcile_queue_length",
2729
Help: "Length of reconcile queue per controller",
2830
}, []string{"controller"})
2931

32+
// ReconcileErrors is a prometheus counter metrics which holds the total
33+
// number of errors from the Reconciler
3034
ReconcileErrors = prometheus.NewCounterVec(prometheus.CounterOpts{
3135
Name: "controller_runtime_reconcile_errors_total",
3236
Help: "Total number of reconcile errors per controller",
3337
}, []string{"controller"})
3438

39+
// ReconcileTime is a prometheus metric which keeps track of the duration
40+
// of reconciles
3541
ReconcileTime = prometheus.NewHistogramVec(prometheus.HistogramOpts{
3642
Name: "controller_runtime_reconcile_time_second",
3743
Help: "Length of time per reconcile per controller",

pkg/manager/internal.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ func (cm *controllerManager) serveMetrics(stop <-chan struct{}) {
185185
// Shutdown the server when stop is closed
186186
select {
187187
case <-stop:
188-
server.Shutdown(context.Background())
188+
if err := server.Shutdown(context.Background()); err != nil {
189+
cm.errChan <- err
190+
}
189191
}
190192
}
191193

pkg/metrics/doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ limitations under the License.
1717
/*
1818
Package metrics contains controller related metrics utilities
1919
*/
20-
2120
package metrics

0 commit comments

Comments
 (0)