diff --git a/CHANGELOG.md b/CHANGELOG.md index e0012cbe..e3e78e76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +### Bug fixes + +- Allow downscaling InstancePool and NodePool to 0 + ## 1.90.1 ### Bug fixes diff --git a/cmd/compute/instance_pool/instance_pool_scale.go b/cmd/compute/instance_pool/instance_pool_scale.go index 1f84bf85..f235a2a4 100644 --- a/cmd/compute/instance_pool/instance_pool_scale.go +++ b/cmd/compute/instance_pool/instance_pool_scale.go @@ -44,8 +44,8 @@ func (c *instancePoolScaleCmd) CmdPreRun(cmd *cobra.Command, args []string) erro } func (c *instancePoolScaleCmd) CmdRun(_ *cobra.Command, _ []string) error { - if c.Size <= 0 { - return errors.New("minimum Instance Pool size is 1") + if c.Size < 0 { + return errors.New("minimum Instance Pool size is 0") } ctx := exocmd.GContext diff --git a/cmd/compute/sks/sks_nodepool_scale.go b/cmd/compute/sks/sks_nodepool_scale.go index ac6825fe..d151bd25 100644 --- a/cmd/compute/sks/sks_nodepool_scale.go +++ b/cmd/compute/sks/sks_nodepool_scale.go @@ -50,8 +50,8 @@ func (c *sksNodepoolScaleCmd) CmdPreRun(cmd *cobra.Command, args []string) error } func (c *sksNodepoolScaleCmd) CmdRun(_ *cobra.Command, _ []string) error { - if c.Size <= 0 { - return errors.New("minimum Nodepool size is 1") + if c.Size < 0 { + return errors.New("minimum Nodepool size is 0") } ctx := exocmd.GContext