Skip to content

Commit f5f6291

Browse files
knight42k8s-publishing-bot
authored andcommitted
feat(api): add field stream to PodLogOptions
Signed-off-by: Jian Zeng <[email protected]> Kubernetes-commit: 82c6296a95ee5c32438a2c850e215f415ced51c0
1 parent 612908a commit f5f6291

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

core/v1/types.go

+19-1
Original file line numberDiff line numberDiff line change
@@ -6643,6 +6643,15 @@ type Preconditions struct {
66436643
UID *types.UID `json:"uid,omitempty" protobuf:"bytes,1,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
66446644
}
66456645

6646+
const (
6647+
// LogStreamStdout is the stream type for stdout.
6648+
LogStreamStdout = "Stdout"
6649+
// LogStreamStderr is the stream type for stderr.
6650+
LogStreamStderr = "Stderr"
6651+
// LogStreamAll represents the combined stdout and stderr.
6652+
LogStreamAll = "All"
6653+
)
6654+
66466655
// +k8s:conversion-gen:explicit-from=net/url.Values
66476656
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
66486657
// +k8s:prerelease-lifecycle-gen:introduced=1.0
@@ -6677,7 +6686,8 @@ type PodLogOptions struct {
66776686
// +optional
66786687
Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"`
66796688
// If set, the number of lines from the end of the logs to show. If not specified,
6680-
// logs are shown from the creation of the container or sinceSeconds or sinceTime
6689+
// logs are shown from the creation of the container or sinceSeconds or sinceTime.
6690+
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
66816691
// +optional
66826692
TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"`
66836693
// If set, the number of bytes to read from the server before terminating the
@@ -6694,6 +6704,14 @@ type PodLogOptions struct {
66946704
// the actual log data coming from the real kubelet).
66956705
// +optional
66966706
InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,9,opt,name=insecureSkipTLSVerifyBackend"`
6707+
6708+
// Specify which container log stream to return to the client.
6709+
// Acceptable values are "All", "Stdout" and "Stderr". If not specified, "All" is used, and both stdout and stderr
6710+
// are returned interleaved.
6711+
// Note that when "TailLines" is specified, "Stream" can only be set to nil or "All".
6712+
// +featureGate=PodLogsQuerySplitStreams
6713+
// +optional
6714+
Stream *string `json:"stream,omitempty" protobuf:"varint,10,opt,name=stream"`
66976715
}
66986716

66996717
// +k8s:conversion-gen:explicit-from=net/url.Values

0 commit comments

Comments
 (0)