Skip to content

Commit bfae0cc

Browse files
committed
Register nodeipam controller under canonical name
Otherwise it cannot be enabled/disabled, because that operates on the canonical name only.
1 parent b4a4a1b commit bfae0cc

File tree

1 file changed

+2
-2
lines changed
  • cmd/cloud-controller-manager

1 file changed

+2
-2
lines changed

cmd/cloud-controller-manager/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ limitations under the License.
2020
package main
2121

2222
import (
23-
"k8s.io/cloud-provider/names"
2423
"math/rand"
2524
"os"
2625
"time"
@@ -31,6 +30,7 @@ import (
3130
_ "k8s.io/cloud-provider-gcp/providers/gce"
3231
"k8s.io/cloud-provider/app"
3332
"k8s.io/cloud-provider/app/config"
33+
"k8s.io/cloud-provider/names"
3434
"k8s.io/cloud-provider/options"
3535
cliflag "k8s.io/component-base/cli/flag"
3636
"k8s.io/component-base/logs"
@@ -57,7 +57,7 @@ func main() {
5757
nodeIpamController.nodeIPAMControllerOptions.NodeIPAMControllerConfiguration = &nodeIpamController.nodeIPAMControllerConfiguration
5858
fss := cliflag.NamedFlagSets{}
5959
nodeIpamController.nodeIPAMControllerOptions.AddFlags(fss.FlagSet("nodeipam controller"))
60-
controllerInitializers["nodeipam"] = app.ControllerInitFuncConstructor{
60+
controllerInitializers[kcmnames.NodeIpamController] = app.ControllerInitFuncConstructor{
6161
Constructor: nodeIpamController.startNodeIpamControllerWrapper,
6262
}
6363

0 commit comments

Comments
 (0)