Merge pull request #81342 from knight42/fix/kubectl-patch-scale

Refactor `kubectl scale` to patch scale subresource
This commit is contained in:
Kubernetes Prow Robot
2019-08-26 11:53:54 -07:00
committed by GitHub
11 changed files with 215 additions and 109 deletions

View File

@@ -2183,10 +2183,10 @@ func ScaleResource(
size uint,
wait bool,
kind schema.GroupKind,
gr schema.GroupResource,
gvr schema.GroupVersionResource,
) error {
ginkgo.By(fmt.Sprintf("Scaling %v %s in namespace %s to %d", kind, name, ns, size))
if err := testutils.ScaleResourceWithRetries(scalesGetter, ns, name, size, gr); err != nil {
if err := testutils.ScaleResourceWithRetries(scalesGetter, ns, name, size, gvr); err != nil {
return fmt.Errorf("error while scaling RC %s to %d replicas: %v", name, size, err)
}
if !wait {