Kubelet: implement PodStatus for new runtime API

This commit is contained in:
Pengfei Ni
2016-08-13 15:12:40 +08:00
parent 1952986a34
commit 1c62d2c368
9 changed files with 263 additions and 8 deletions

View File

@@ -28,8 +28,8 @@ import (
var (
version = "0.1.0"
fakeRuntimeName = "fakeRuntime"
fakePodSandboxIP = "192.168.192.168"
FakeRuntimeName = "fakeRuntime"
FakePodSandboxIP = "192.168.192.168"
)
type FakePodSandbox struct {
@@ -93,7 +93,7 @@ func (r *FakeRuntimeService) Version(apiVersion string) (*runtimeApi.VersionResp
return &runtimeApi.VersionResponse{
Version: &version,
RuntimeName: &fakeRuntimeName,
RuntimeName: &FakeRuntimeName,
RuntimeVersion: &version,
RuntimeApiVersion: &version,
}, nil
@@ -169,7 +169,7 @@ func (r *FakeRuntimeService) PodSandboxStatus(podSandboxID string) (*runtimeApi.
CreatedAt: s.CreatedAt,
State: s.State,
Network: &runtimeApi.PodSandboxNetworkStatus{
Ip: &fakePodSandboxIP,
Ip: &FakePodSandboxIP,
},
Labels: s.Labels,
Annotations: s.Annotations,