Skip to content

Commit

Permalink
Added back functionality to deprecated max-scale/min-scale (#1010)
Browse files Browse the repository at this point in the history
* Added back functionality to deprecated max-scale/min-scale

* Updated based on review, removed duplicate code and added an or statement, also updated deprecated message
  • Loading branch information
Mike Petersen authored Oct 6, 2020
1 parent 6baab2e commit 0997cb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/kn/commands/service/configuration_edit_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,16 @@ func (p *ConfigurationEditFlags) Apply(
}
}

if cmd.Flags().Changed("scale-min") {
// Deprecated "min-scale" in 0.19, updated to "scale-min"
if cmd.Flags().Changed("scale-min") || cmd.Flags().Changed("min-scale") {
err = servinglib.UpdateMinScale(template, p.MinScale)
if err != nil {
return err
}
}

if cmd.Flags().Changed("scale-max") {
// Deprecated "max-scale" in 0.19, updated to "scale-max"
if cmd.Flags().Changed("scale-max") || cmd.Flags().Changed("max-scale") {
err = servinglib.UpdateMaxScale(template, p.MaxScale)
if err != nil {
return err
Expand Down

0 comments on commit 0997cb0

Please sign in to comment.