Skip to content

Commit 124926f

Browse files
authored
Merge pull request kubernetes#77306 from bjhaid/cleanup_controller_manager
Clean up controller-manager.
2 parents 1a16279 + a591a83 commit 124926f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmd/controller-manager/app/options/generic.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ func (o *GenericControllerManagerConfigurationOptions) Validate(allControllers [
103103
if controller == "*" {
104104
continue
105105
}
106-
if strings.HasPrefix(controller, "-") {
107-
controller = controller[1:]
108-
}
106+
controller = strings.TrimPrefix(controller, "-")
109107
if !allControllersSet.Has(controller) {
110108
errs = append(errs, fmt.Errorf("%q is not in the list of known controllers", controller))
111109
}

0 commit comments

Comments
 (0)