Skip to content

Commit

Permalink
OCM-9140 | fix: Do not enable interactive for max-surge and max-avail…
Browse files Browse the repository at this point in the history
…able
  • Loading branch information
philipwu08 committed Jun 26, 2024
1 parent 9cd807c commit 07f74d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/edit/machinepool/nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,

// isAnyAdditionalParameterSet is true if at least one parameter not related to replicas and autoscaling is set
isAnyAdditionalParameterSet := isLabelsSet || isTaintsSet || isAutorepairSet || isTuningsConfigSet ||
isKubeletConfigSet
isKubeletConfigSet || isUpgradeMaxSurgeSet || isUpgradeMaxUnavailableSet
isAnyParameterSet := isMinReplicasSet || isMaxReplicasSet || isReplicasSet ||
isAutoscalingSet || isAnyAdditionalParameterSet

Expand Down Expand Up @@ -225,7 +225,7 @@ func editNodePool(cmd *cobra.Command, nodePoolID string,
}
}

if isUpgradeMaxSurgeSet && isUpgradeMaxUnavailableSet && interactive.Enabled() {
if isUpgradeMaxSurgeSet && isUpgradeMaxUnavailableSet {
maxSurge := args.maxSurge
if maxSurge == "" && nodePool.ManagementUpgrade().MaxSurge() != "" {
maxSurge = nodePool.ManagementUpgrade().MaxSurge()
Expand Down

0 comments on commit 07f74d0

Please sign in to comment.