()
| 179 | } |
| 180 | |
| 181 | func (o *ScaleOptions) Validate() error { |
| 182 | if o.Replicas < 0 { |
| 183 | return fmt.Errorf("The --replicas=COUNT flag is required, and COUNT must be greater than or equal to 0") |
| 184 | } |
| 185 | |
| 186 | if o.CurrentReplicas < -1 { |
| 187 | return fmt.Errorf("The --current-replicas must specify an integer of -1 or greater") |
| 188 | } |
| 189 | |
| 190 | return nil |
| 191 | } |
| 192 | |
| 193 | // RunScale executes the scaling |
| 194 | func (o *ScaleOptions) RunScale() error { |