Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #256 from resouer/fix-ip-mask
Browse files Browse the repository at this point in the history
Fix ip with mask in pod status
  • Loading branch information
bergwolf authored Oct 23, 2017
2 parents 6e8186d + 571afbd commit 18853d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/hyper/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ func (h *Runtime) PodSandboxStatus(podSandboxID string) (*kubeapi.PodSandboxStat
state := toPodSandboxState(info.Status.Phase)
podIP := ""
if len(info.Status.PodIP) > 0 {
podIP = info.Status.PodIP[0]
// Need to do split here since newer hyperd (after 0.8.1) returns 10.244.1.195/24
podIP = strings.Split(info.Status.PodIP[0], "/")[0]
}

podName, podNamespace, podUID, attempt, err := parseSandboxName(info.PodName)
Expand Down

0 comments on commit 18853d4

Please sign in to comment.