Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions pkg/controller/kubelet-config/kubelet_config_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ func (ctrl *Controller) syncNodeConfigHandler(key string) error {
err := fmt.Errorf("could not fetch Node: %w", err)
return err
}
if err := ctrl.cleanUpDuplicatedMC(managedNodeConfigKeyPrefix); err != nil {
return err
}

// Fetch the controllerconfig
cc, err := ctrl.ccLister.Get(ctrlcommon.ControllerConfigName)
if err != nil {
Expand Down Expand Up @@ -162,6 +158,9 @@ func (ctrl *Controller) syncNodeConfigHandler(key string) error {
klog.Infof("Applied Node configuration %v on MachineConfigPool %v", key, pool.Name)
ctrlcommon.UpdateStateMetric(ctrlcommon.MCCSubControllerState, "machine-config-controller-kubelet-config", "Sync NodeConfig", pool.Name)
}
if err := ctrl.cleanUpDuplicatedMC(managedNodeConfigKeyPrefix); err != nil {
return err
}
// fetch the kubeletconfigs
kcs, err := ctrl.mckLister.List(labels.Everything())
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/kubelet-config/kubelet_config_nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func TestNodeConfigDefault(t *testing.T) {
f.expectGetMachineConfigAction(mcsDeprecated)
f.expectGetMachineConfigAction(mcs)
f.expectCreateMachineConfigAction(mcs)
f.expectGetMachineConfigAction(mcs)
f.runNode(getKeyFromConfigNode(nodeConfig, t))
})
}
Expand Down