diff --git a/cmd/create/machinepool/nodepool.go b/cmd/create/machinepool/nodepool.go index b0368fe646..42c9262b02 100644 --- a/cmd/create/machinepool/nodepool.go +++ b/cmd/create/machinepool/nodepool.go @@ -474,7 +474,7 @@ func addNodePool(cmd *cobra.Command, clusterKey string, cluster *cmv1.Cluster, r isMaxSurgeSet := cmd.Flags().Changed("max-surge") isMaxUnavailableSet := cmd.Flags().Changed("max-unavailable") - if isMaxSurgeSet && isMaxUnavailableSet { + if isMaxSurgeSet || isMaxUnavailableSet || interactive.Enabled() { maxSurge := args.maxSurge if interactive.Enabled() { maxSurge, err = interactive.GetString(interactive.Input{ diff --git a/pkg/machinepool/machinepool.go b/pkg/machinepool/machinepool.go index bc08bd3b0f..da65bda612 100644 --- a/pkg/machinepool/machinepool.go +++ b/pkg/machinepool/machinepool.go @@ -779,7 +779,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string, } } - if isUpgradeMaxSurgeSet && isUpgradeMaxUnavailableSet { + if isUpgradeMaxSurgeSet || isUpgradeMaxUnavailableSet || interactive.Enabled() { maxSurge := cmd.Flags().Lookup("max-surge").Value.String() if maxSurge == "" && nodePool.ManagementUpgrade().MaxSurge() != "" { maxSurge = nodePool.ManagementUpgrade().MaxSurge()