Skip to content

Commit

Permalink
Hide POD container from end users
Browse files Browse the repository at this point in the history
  • Loading branch information
dchen1107 committed Mar 3, 2015
1 parent 900d58e commit dad365f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion cmd/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.Pod
m := make(api.PodInfo)
for k, v := range r.Status.Info {
v.Ready = true
v.PodIP = "1.2.3.4"
m[k] = v
}
r.Status.Info = m
Expand Down Expand Up @@ -257,8 +256,10 @@ func endpointsSet(c *client.Client, serviceNamespace, serviceID string, endpoint
return func() (bool, error) {
endpoints, err := c.Endpoints(serviceNamespace).Get(serviceID)
if err != nil {
glog.Infof("Error on creating endpoints: %v", err)
return false, nil
}
glog.Infof("endpoints: %v", endpoints.Endpoints)
return len(endpoints.Endpoints) == endpointCount, nil
}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubelet/dockertools/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
return &containerStatus, nil
}

// GetDockerPodInfo returns docker info for all containers in the pod/manifest.
// GetDockerPodInfo returns docker info for all containers in the pod/manifest and
// infrastructure container
func GetDockerPodInfo(client DockerInterface, manifest api.PodSpec, podFullName string, uid types.UID) (api.PodInfo, error) {
info := api.PodInfo{}
expectedContainers := make(map[string]api.Container)
Expand Down
8 changes: 3 additions & 5 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1692,21 +1692,19 @@ func (kl *Kubelet) GetPodStatus(podFullName string, uid types.UID) (api.PodStatu

// Assume info is ready to process
podStatus.Phase = getPhase(spec, info)
podStatus.Info = api.PodInfo{}
for _, c := range spec.Containers {
containerStatus := info[c.Name]
containerStatus.Ready = kl.readiness.IsReady(containerStatus)
info[c.Name] = containerStatus
podStatus.Info[c.Name] = containerStatus
}
podStatus.Conditions = append(podStatus.Conditions, getPodReadyCondition(spec, info)...)
podStatus.Conditions = append(podStatus.Conditions, getPodReadyCondition(spec, podStatus.Info)...)

netContainerInfo, found := info[dockertools.PodInfraContainerName]
if found {
podStatus.PodIP = netContainerInfo.PodIP
}

// TODO(dchen1107): Change Info to list from map
podStatus.Info = info

return podStatus, nil
}

Expand Down

0 comments on commit dad365f

Please sign in to comment.