Skip to content

Commit

Permalink
OCM-8283 | fix: kubelet-config edit prompt no longer shows up when ku…
Browse files Browse the repository at this point in the history
…belet-configs are not targeted
  • Loading branch information
den-rgb committed May 28, 2024
1 parent e1858fa commit 3037ff8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/edit/machinepool/nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,
inputKubeletConfig = nodePool.KubeletConfigs()
}

// Skip if no tuning configs are available
// Skip if no kubelet configs are available
if len(availableKubeletConfigs) > 0 {
inputKubeletConfig, err = interactive.GetMultipleOptions(interactive.Input{
Question: "Kubelet config",
Expand All @@ -199,6 +199,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,
os.Exit(1)
}
npBuilder.KubeletConfigs(inputKubeletConfig...)
isKubeletConfigSet = true
}

if isNodeDrainGracePeriodSet || interactive.Enabled() {
Expand Down Expand Up @@ -234,7 +235,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,
return fmt.Errorf("Failed to create machine pool for hosted cluster '%s': %v", clusterKey, err)
}

if !promptForNodePoolNodeRecreate(nodePool, update, PromptToAcceptNodePoolNodeRecreate, r) {
if isKubeletConfigSet && !promptForNodePoolNodeRecreate(nodePool, update, PromptToAcceptNodePoolNodeRecreate, r) {
return nil
}

Expand Down

0 comments on commit 3037ff8

Please sign in to comment.