Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func main() {

// Build all of our controllers, with the clients constructed above.
// Add new controllers to this array.
controllers := []*controller.Impl{
controllersArray := [...]*controller.Impl{
configuration.NewController(
opt,
configurationInformer,
Expand Down Expand Up @@ -147,9 +147,9 @@ func main() {
endpointsInformer,
),
}
if len(controllers) != numControllers {
logger.Fatalf("Number of controllers and QPS settings mismatch: %d != %d", len(controllers), numControllers)
}
controllers := controllersArray[:]
// compile-time assert numControllers == len(controllersArray)
var _ [numControllers - len(controllersArray)][len(controllersArray) - numControllers]int

// Watch the logging config map and dynamically update logging levels.
opt.ConfigMapWatcher.Watch(logging.ConfigMapName(), logging.UpdateLevelFromConfigMap(logger, atomicLevel, component))
Expand Down