Merge pull request #60672 from kow3ns/fix-60003

Automatic merge from submit-queue. 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 selector to DaemonSet in newDaemonSet function so that the v1 api…

**What this PR does / why we need it**:
When we upgraded the DaemonSet e2e to use apps v1 I neglected to add a selector to match the labels of the created Pods. This broke some apps Serial tests.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-03-02 21:17:15 -08:00 committed by GitHub
commit a456d1cec2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,6 +466,9 @@ func newDaemonSet(dsName, image string, label map[string]string) *apps.DaemonSet
Name: dsName,
},
Spec: apps.DaemonSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: label,
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: label,