mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +00:00
feat(api): add field stream to PodLogOptions
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
This commit is contained in:
@@ -5503,6 +5503,15 @@ type Preconditions struct {
|
|||||||
UID *types.UID
|
UID *types.UID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// LogStreamStdout is the stream type for stdout.
|
||||||
|
LogStreamStdout = "Stdout"
|
||||||
|
// LogStreamStderr is the stream type for stderr.
|
||||||
|
LogStreamStderr = "Stderr"
|
||||||
|
// LogStreamAll represents the combined stdout and stderr.
|
||||||
|
LogStreamAll = "All"
|
||||||
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// PodLogOptions is the query options for a Pod's logs REST call
|
// PodLogOptions is the query options for a Pod's logs REST call
|
||||||
@@ -5529,7 +5538,8 @@ type PodLogOptions struct {
|
|||||||
// of log output.
|
// of log output.
|
||||||
Timestamps bool
|
Timestamps bool
|
||||||
// If set, the number of lines from the end of the logs to show. If not specified,
|
// If set, the number of lines from the end of the logs to show. If not specified,
|
||||||
// logs are shown from the creation of the container or sinceSeconds or sinceTime
|
// logs are shown from the creation of the container or sinceSeconds or sinceTime.
|
||||||
|
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
|
||||||
TailLines *int64
|
TailLines *int64
|
||||||
// If set, the number of bytes to read from the server before terminating the
|
// If set, the number of bytes to read from the server before terminating the
|
||||||
// log output. This may not display a complete final line of logging, and may return
|
// log output. This may not display a complete final line of logging, and may return
|
||||||
@@ -5544,6 +5554,14 @@ type PodLogOptions struct {
|
|||||||
// the actual log data coming from the real kubelet).
|
// the actual log data coming from the real kubelet).
|
||||||
// +optional
|
// +optional
|
||||||
InsecureSkipTLSVerifyBackend bool
|
InsecureSkipTLSVerifyBackend bool
|
||||||
|
|
||||||
|
// Specify which container log stream to return to the client.
|
||||||
|
// Acceptable values are "All", "Stdout" and "Stderr". If not specified, "All" is used, and both stdout and stderr
|
||||||
|
// are returned interleaved.
|
||||||
|
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
|
||||||
|
// +featureGate=PodLogsQuerySplitStreams
|
||||||
|
// +optional
|
||||||
|
Stream *string
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
@@ -6574,6 +6574,15 @@ type Preconditions struct {
|
|||||||
UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
|
UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
// LogStreamStdout is the stream type for stdout.
|
||||||
|
LogStreamStdout = "Stdout"
|
||||||
|
// LogStreamStderr is the stream type for stderr.
|
||||||
|
LogStreamStderr = "Stderr"
|
||||||
|
// LogStreamAll represents the combined stdout and stderr.
|
||||||
|
LogStreamAll = "All"
|
||||||
|
)
|
||||||
|
|
||||||
// +k8s:conversion-gen:explicit-from=net/url.Values
|
// +k8s:conversion-gen:explicit-from=net/url.Values
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
// +k8s:prerelease-lifecycle-gen:introduced=1.0
|
// +k8s:prerelease-lifecycle-gen:introduced=1.0
|
||||||
@@ -6608,7 +6617,8 @@ type PodLogOptions struct {
|
|||||||
// +optional
|
// +optional
|
||||||
Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
|
Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
|
||||||
// If set, the number of lines from the end of the logs to show. If not specified,
|
// If set, the number of lines from the end of the logs to show. If not specified,
|
||||||
// logs are shown from the creation of the container or sinceSeconds or sinceTime
|
// logs are shown from the creation of the container or sinceSeconds or sinceTime.
|
||||||
|
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
|
||||||
// +optional
|
// +optional
|
||||||
TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
|
TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
|
||||||
// If set, the number of bytes to read from the server before terminating the
|
// If set, the number of bytes to read from the server before terminating the
|
||||||
@@ -6625,6 +6635,14 @@ type PodLogOptions struct {
|
|||||||
// the actual log data coming from the real kubelet).
|
// the actual log data coming from the real kubelet).
|
||||||
// +optional
|
// +optional
|
||||||
InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"`
|
InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"`
|
||||||
|
|
||||||
|
// Specify which container log stream to return to the client.
|
||||||
|
// Acceptable values are "All", "Stdout" and "Stderr". If not specified, "All" is used, and both stdout and stderr
|
||||||
|
// are returned interleaved.
|
||||||
|
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
|
||||||
|
// +featureGate=PodLogsQuerySplitStreams
|
||||||
|
// +optional
|
||||||
|
Stream *string `json:"stream,omitempty" protobuf:"varint,10,opt,name=stream"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// +k8s:conversion-gen:explicit-from=net/url.Values
|
// +k8s:conversion-gen:explicit-from=net/url.Values
|
||||||
|
Reference in New Issue
Block a user