PodStatus Message needs to be round-trippable

This commit is contained in:
Clayton Coleman 2014-12-12 16:25:04 -05:00
parent 904d0d46c3
commit eb906f2993
3 changed files with 7 additions and 0 deletions

View File

@ -469,6 +469,9 @@ type PodSpec struct {
type PodStatus struct {
Phase PodPhase `json:"phase,omitempty"`
// A human readable message indicating details about why the pod is in this state.
Message string `json:"message,omitempty"`
// Host is the name of the node that this Pod is currently bound to, or empty if no
// assignment has been done.
Host string `json:"host,omitempty"`

View File

@ -176,6 +176,7 @@ func init() {
if err := s.Convert(&in.Info, &out.Info, 0); err != nil {
return err
}
out.Message = in.Message
out.Host = in.Host
out.HostIP = in.HostIP
out.PodIP = in.PodIP
@ -189,6 +190,7 @@ func init() {
return err
}
out.Message = in.Message
out.Host = in.Host
out.HostIP = in.HostIP
out.PodIP = in.PodIP

View File

@ -295,6 +295,7 @@ func init() {
if err := s.Convert(&in.Info, &out.Info, 0); err != nil {
return err
}
out.Message = in.Message
out.Host = in.Host
out.HostIP = in.HostIP
out.PodIP = in.PodIP
@ -307,6 +308,7 @@ func init() {
if err := s.Convert(&in.Info, &out.Info, 0); err != nil {
return err
}
out.Message = in.Message
out.Host = in.Host
out.HostIP = in.HostIP
out.PodIP = in.PodIP