Merge pull request #28109 from jszczepkowski/influx-ps

Automatic merge from submit-queue

Influxdb migrated to PetSet and PersistentVolumes.

```release-note
Influxdb migrated to PetSet and PersistentVolumes.
```
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()

Influxdb migrated to PetSet and PersistentVolumes.
This commit is contained in:
k8s-merge-robot
2016-06-29 05:02:15 -07:00
committed by GitHub
9 changed files with 90 additions and 83 deletions

View File

@@ -110,7 +110,11 @@ func verifyExpectedRcsExistAndGetExpectedPods(c *client.Client) ([]string, error
if err != nil {
return nil, err
}
if (len(rcList.Items) + len(deploymentList.Items)) != 1 {
psList, err := c.Apps().PetSets(api.NamespaceSystem).List(options)
if err != nil {
return nil, err
}
if (len(rcList.Items) + len(deploymentList.Items) + len(psList.Items)) != 1 {
return nil, fmt.Errorf("expected to find one replica for RC or deployment with label %s but got %d",
rcLabel, len(rcList.Items))
}
@@ -144,6 +148,21 @@ func verifyExpectedRcsExistAndGetExpectedPods(c *client.Client) ([]string, error
expectedPods = append(expectedPods, string(pod.UID))
}
}
// And for pet sets.
for _, ps := range psList.Items {
selector := labels.Set(ps.Spec.Selector.MatchLabels).AsSelector()
options := api.ListOptions{LabelSelector: selector}
podList, err := c.Pods(api.NamespaceSystem).List(options)
if err != nil {
return nil, err
}
for _, pod := range podList.Items {
if pod.DeletionTimestamp != nil {
continue
}
expectedPods = append(expectedPods, string(pod.UID))
}
}
}
return expectedPods, nil
}