mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
v1beta3 Pod refactor
This commit is contained in:
@@ -46,10 +46,10 @@ func waitForPodRunning(c *client.Client, id string) {
|
||||
glog.Warningf("Get pod failed: %v", err)
|
||||
continue
|
||||
}
|
||||
if pod.CurrentState.Status == api.PodRunning {
|
||||
if pod.Status.Condition == api.PodRunning {
|
||||
break
|
||||
}
|
||||
glog.Infof("Waiting for pod status to be running (%s)", pod.CurrentState.Status)
|
||||
glog.Infof("Waiting for pod status to be running (%s)", pod.Status.Condition)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ func TestPodUpdate(c *client.Client) bool {
|
||||
value = "time" + value
|
||||
pod.Labels["time"] = value
|
||||
pod.ResourceVersion = podOut.ResourceVersion
|
||||
pod.DesiredState.Manifest.UUID = podOut.DesiredState.Manifest.UUID
|
||||
pod.UID = podOut.UID
|
||||
pod, err = podClient.Update(pod)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to update pod: %v", err)
|
||||
|
@@ -216,7 +216,7 @@ func podsOnMinions(c *client.Client, pods api.PodList) wait.ConditionFunc {
|
||||
podInfo := fakeKubeletClient{}
|
||||
return func() (bool, error) {
|
||||
for i := range pods.Items {
|
||||
host, id, namespace := pods.Items[i].CurrentState.Host, pods.Items[i].Name, pods.Items[i].Namespace
|
||||
host, id, namespace := pods.Items[i].Status.Host, pods.Items[i].Name, pods.Items[i].Namespace
|
||||
if len(host) == 0 {
|
||||
return false, nil
|
||||
}
|
||||
@@ -499,21 +499,18 @@ func runServiceTest(client *client.Client) {
|
||||
"name": "thisisalonglabel",
|
||||
},
|
||||
},
|
||||
DesiredState: api.PodState{
|
||||
Manifest: api.ContainerManifest{
|
||||
Version: "v1beta1",
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: "c1",
|
||||
Image: "foo",
|
||||
Ports: []api.Port{
|
||||
{ContainerPort: 1234},
|
||||
},
|
||||
Spec: api.PodSpec{
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: "c1",
|
||||
Image: "foo",
|
||||
Ports: []api.Port{
|
||||
{ContainerPort: 1234},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
CurrentState: api.PodState{
|
||||
Status: api.PodStatus{
|
||||
PodIP: "1.2.3.4",
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user