Merge pull request #62114 from deads2k/cli-22-jobs

Automatic merge from submit-queue (batch tested with PRs 62208, 62114, 62144, 60460, 62214). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

removes job scaler, continued

Builds on https://github.com/kubernetes/kubernetes/pull/61912 (original commit is there for credit/blame)

This keeps all the updates to the scaler building and all the test and reaper cleanup.  It just keeps a fake job scaler around for a different command path and the reaper.

/assign @p0lyn0mial 
/assign @soltysh 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue
2018-04-06 17:06:09 -07:00
committed by GitHub
25 changed files with 666 additions and 497 deletions

View File

@@ -2803,7 +2803,6 @@ func RemoveAvoidPodsOffNode(c clientset.Interface, nodeName string) {
func ScaleResource(
clientset clientset.Interface,
internalClientset internalclientset.Interface,
scalesGetter scaleclient.ScalesGetter,
ns, name string,
size uint,
@@ -2812,8 +2811,8 @@ func ScaleResource(
gr schema.GroupResource,
) error {
By(fmt.Sprintf("Scaling %v %s in namespace %s to %d", kind, name, ns, size))
scaler := kubectl.ScalerFor(kind, internalClientset.Batch(), scalesGetter, gr)
if err := testutils.ScaleResourceWithRetries(scaler, ns, name, size); err != nil {
scaler := kubectl.NewScaler(scalesGetter)
if err := testutils.ScaleResourceWithRetries(scaler, ns, name, size, gr); err != nil {
return fmt.Errorf("error while scaling RC %s to %d replicas: %v", name, size, err)
}
if !wait {