-
Notifications
You must be signed in to change notification settings - Fork 38.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubelet/rkt: Add podInfo. #7555
Conversation
status.PodIP = p.getIP() | ||
// For now just make every container's state as same as the pod. | ||
for _, container := range pod.Containers { | ||
status.ContainerStatuses = append(status.ContainerStatuses, p.getContainerStatus(container)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually just using the pod status? Looks like we do get per-container status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Containers are sharing fate at this moment, so they have the same status. This is something under hot discussion. Should be more clearer in the following weeks:
appc/spec#276
state string | ||
// The ip of the pod. IPv4 for now. | ||
ip string | ||
networkInfo string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is unused
8c50615
to
74f1452
Compare
@vmarmol Rebased and also moved |
|
||
// splitLineByTab breaks a line by tabs, and trims the leading and tailing spaces. | ||
// Not using strings.Split because there could be multiple tabs. | ||
func splitLineByTab(line string) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively: Split on tabs and remove all empty strings in the slice. May be simpler to implement and reason about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
podInfo reprensents the state of rkt pods. It is used to for reporting the pod and container status to kubelet.
Thanks for the thorough review! @vmarmol ! |
LGTM |
LGTM, thanks for the quick changes @yifan-gu! |
type containerID struct { | ||
uuid string // uuid of the pod. | ||
appName string // name of the app in that pod. | ||
imageID string // id of the image. TODO(yifan): Depreciate this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, deprecate
Good to go on this one? |
@jonboulle yep, just waiting on the CI (which is taking so much longer than I'd like :( ) |
It's green! |
awesome! |
@vmarmol @dchen1107 @jonboulle @bakins
Another shot following #7465
This adds podInfo, which represents the rkt pod's state, and is used for reporting pod/container status to kubelet.
Think we have about three more PRs after this for implementing syncPod for rkt!