Commit ffa59470 authored by Dawn Chen's avatar Dawn Chen

Introduce Previous as PodLogOptions

parent ecaf0874
...@@ -1330,6 +1330,9 @@ type PodLogOptions struct { ...@@ -1330,6 +1330,9 @@ type PodLogOptions struct {
// If true, follow the logs for the pod // If true, follow the logs for the pod
Follow bool Follow bool
// If true, return previous terminated container logs
Previous bool
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
......
...@@ -1802,6 +1802,7 @@ func init() { ...@@ -1802,6 +1802,7 @@ func init() {
} }
out.Container = in.Container out.Container = in.Container
out.Follow = in.Follow out.Follow = in.Follow
out.Previous = in.Previous
return nil return nil
}, },
func(in *newer.PodLogOptions, out *PodLogOptions, s conversion.Scope) error { func(in *newer.PodLogOptions, out *PodLogOptions, s conversion.Scope) error {
...@@ -1810,6 +1811,7 @@ func init() { ...@@ -1810,6 +1811,7 @@ func init() {
} }
out.Container = in.Container out.Container = in.Container
out.Follow = in.Follow out.Follow = in.Follow
out.Previous = in.Previous
return nil return nil
}, },
func(in *PodProxyOptions, out *newer.PodProxyOptions, s conversion.Scope) error { func(in *PodProxyOptions, out *newer.PodProxyOptions, s conversion.Scope) error {
......
...@@ -1320,6 +1320,9 @@ type PodLogOptions struct { ...@@ -1320,6 +1320,9 @@ type PodLogOptions struct {
// If true, follow the logs for the pod // If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"` Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
// If true, return previous terminated container logs
Previous bool `json:"previous,omitempty" description:"return previous terminated container logs; defaults to false"`
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
......
...@@ -1188,6 +1188,9 @@ type PodLogOptions struct { ...@@ -1188,6 +1188,9 @@ type PodLogOptions struct {
// If true, follow the logs for the pod // If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"` Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
// If true, return previous terminated container logs
Previous bool `json:"previous,omitempty" description:"return previous terminated container logs; defaults to false"`
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
......
...@@ -1208,6 +1208,9 @@ type PodLogOptions struct { ...@@ -1208,6 +1208,9 @@ type PodLogOptions struct {
// If true, follow the logs for the pod // If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"` Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
// If true, return previous terminated container logs
Previous bool `json:"previous,omitempty" description:"return previous terminated container logs; defaults to false"`
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
......
...@@ -2544,6 +2544,7 @@ func convert_v1beta3_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out * ...@@ -2544,6 +2544,7 @@ func convert_v1beta3_PodLogOptions_To_api_PodLogOptions(in *PodLogOptions, out *
} }
out.Container = in.Container out.Container = in.Container
out.Follow = in.Follow out.Follow = in.Follow
out.Previous = in.Previous
return nil return nil
} }
...@@ -2556,6 +2557,7 @@ func convert_api_PodLogOptions_To_v1beta3_PodLogOptions(in *newer.PodLogOptions, ...@@ -2556,6 +2557,7 @@ func convert_api_PodLogOptions_To_v1beta3_PodLogOptions(in *newer.PodLogOptions,
} }
out.Container = in.Container out.Container = in.Container
out.Follow = in.Follow out.Follow = in.Follow
out.Previous = in.Previous
return nil return nil
} }
......
...@@ -1320,6 +1320,9 @@ type PodLogOptions struct { ...@@ -1320,6 +1320,9 @@ type PodLogOptions struct {
// If true, follow the logs for the pod // If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"` Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
// If true, return previous terminated container logs
Previous bool `json:"previous,omitempty" description:"return previous terminated container logs; defaults to false"`
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment