mirror of
https://github.com/outbackdingo/kubernetes.git
synced 2026-03-01 22:30:21 +00:00
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. ``` []() Influxdb migrated to PetSet and PersistentVolumes.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user