Skip to content

Commit ff6d96e

Browse files
committed
pkg/cvo/metrics: Add additional checks for controllers
1 parent 1dee504 commit ff6d96e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/cvo/metrics.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ func RunMetrics(runContext context.Context, shutdownContext context.Context, lis
215215
if err != nil {
216216
return fmt.Errorf("failed to create serving certificate controller: %w", err)
217217
}
218+
if err := servingContentController.RunOnce(runContext); err != nil {
219+
return fmt.Errorf("failed to initialize serving content controller: %w", err)
220+
}
218221

219222
// Start the serving cert controller to begin watching the cert and key files
220223
go servingContentController.Run(runContext, 1)
@@ -237,6 +240,10 @@ func RunMetrics(runContext context.Context, shutdownContext context.Context, lis
237240
return fmt.Errorf("failed to create client CA controller: %w", err)
238241
}
239242

243+
if err := clientCAController.RunOnce(runContext); err != nil {
244+
return fmt.Errorf("failed to initialize client CA controller: %w", err)
245+
}
246+
240247
// Start the client CA controller to begin watching the ConfigMap
241248
go clientCAController.Run(runContext, 1)
242249
}

0 commit comments

Comments
 (0)