Merge pull request #64406 from soltysh/issue64359

Automatic merge from submit-queue (batch tested with PRs 64399, 64324, 64404, 64406, 64396). 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>.

Add daemonset when to getReplicasFromRuntimeObject when cleaning objects in e2e

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #64359

**Special notes for your reviewer**:
/assign @dims 

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-05-28 15:06:23 -07:00 committed by GitHub
commit 13f084933f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3030,6 +3030,8 @@ func getReplicasFromRuntimeObject(obj runtime.Object) (int32, error) {
return *typed.Spec.Replicas, nil return *typed.Spec.Replicas, nil
} }
return 0, nil return 0, nil
case *extensions.DaemonSet:
return 0, nil
case *batch.Job: case *batch.Job:
// TODO: currently we use pause pods so that's OK. When we'll want to switch to Pods // TODO: currently we use pause pods so that's OK. When we'll want to switch to Pods
// that actually finish we need a better way to do this. // that actually finish we need a better way to do this.