MCPcopy
hub / github.com/kubernetes/kubectl / Validate

Method Validate

pkg/cmd/scale/scale.go:181–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

179}
180
181func (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
194func (o *ScaleOptions) RunScale() error {

Callers 1

NewCmdScaleFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected