@@ -91,6 +91,10 @@ tags, and then generate with `hack/update-toc.sh`.
91
91
- [ Changes of kubelet] ( #changes-of-kubelet )
92
92
- [ Changes of kubectl] ( #changes-of-kubectl )
93
93
- [ Test Plan] ( #test-plan )
94
+ - [ Prerequisite testing updates] ( #prerequisite-testing-updates )
95
+ - [ Unit tests] ( #unit-tests )
96
+ - [ Integration tests] ( #integration-tests )
97
+ - [ e2e tests] ( #e2e-tests )
94
98
- [ Graduation Criteria] ( #graduation-criteria )
95
99
- [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy )
96
100
- [ Version Skew Strategy] ( #version-skew-strategy )
@@ -151,7 +155,9 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
151
155
152
156
## Summary
153
157
154
- This proposal makes it easier for users to view certain log stream of a container,
158
+ Currently, kubelet actually [ has the potential] ( https://github.com/kubernetes/kubernetes/blob/69cabe778bccfc5f4fa9b6788c9def005e7d959d/pkg/kubelet/kuberuntime/logs/logs.go#L281 )
159
+ to return certain log stream of a container, but this ability is not exposed to the user.
160
+ This proposal enables users to view certain log stream of a container,
155
161
and aims to extend kubelet and api-server with the ability to return certain
156
162
container log stream.
157
163
@@ -165,7 +171,6 @@ retrieve certain log stream of a container, so it is great to implement this lon
165
171
166
172
### Goals
167
173
168
- - Enable kubelet to filter log stream of a container
169
174
- Enable api-server to return certain log stream of a container
170
175
- Enable users to fetch certain log stream of a container
171
176
@@ -203,17 +208,6 @@ This might be a good place to talk about core concepts and how they relate.
203
208
204
209
### Risks and Mitigations
205
210
206
- <!--
207
- What are the risks of this proposal, and how do we mitigate? Think broadly.
208
- For example, consider both security and how this will impact the larger
209
- Kubernetes ecosystem.
210
-
211
- How will security be reviewed, and by whom?
212
-
213
- How will UX be reviewed, and by whom?
214
-
215
- Consider including folks who also work outside the SIG or subproject.
216
- -->
217
211
218
212
## Design Details
219
213
@@ -338,6 +332,62 @@ when drafting this test plan.
338
332
[testing-guidelines]: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
339
333
-->
340
334
335
+ [ x] I/we understand the owners of the involved components may require updates to
336
+ existing tests to make this code solid enough prior to committing the changes necessary
337
+ to implement this enhancement.
338
+
339
+ ##### Prerequisite testing updates
340
+
341
+ <!--
342
+ Based on reviewers feedback describe what additional tests need to be added prior
343
+ implementing this enhancement to ensure the enhancements have also solid foundations.
344
+ -->
345
+
346
+ ##### Unit tests
347
+
348
+ <!--
349
+ In principle every added code should have complete unit test coverage, so providing
350
+ the exact set of tests will not bring additional value.
351
+ However, if complete unit test coverage is not possible, explain the reason of it
352
+ together with explanation why this is acceptable.
353
+ -->
354
+
355
+ <!--
356
+ Additionally, for Alpha try to enumerate the core package you will be touching
357
+ to implement this enhancement and provide the current unit coverage for those
358
+ in the form of:
359
+ - <package>: <date> - <current test coverage>
360
+ The data can be easily read from:
361
+ https://testgrid.k8s.io/sig-testing-canaries#ci-kubernetes-coverage-unit
362
+ This can inform certain test coverage improvements that we want to do before
363
+ extending the production code to implement this enhancement.
364
+ -->
365
+
366
+ - ` <package> ` : ` <date> ` - ` <test coverage> `
367
+
368
+ ##### Integration tests
369
+
370
+ <!--
371
+ This question should be filled when targeting a release.
372
+ For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
373
+ For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
374
+ https://storage.googleapis.com/k8s-triage/index.html
375
+ -->
376
+
377
+ - <test >: <link to test coverage >
378
+
379
+ ##### e2e tests
380
+
381
+ <!--
382
+ This question should be filled when targeting a release.
383
+ For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
384
+ For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
385
+ https://storage.googleapis.com/k8s-triage/index.html
386
+ We expect no non-infra related flakes in the last month as a GA graduation criteria.
387
+ -->
388
+
389
+ - <test >: <link to test coverage >
390
+
341
391
### Graduation Criteria
342
392
343
393
<!--
@@ -416,7 +466,11 @@ enhancement:
416
466
cluster required to make on upgrade, in order to make use of the enhancement?
417
467
-->
418
468
419
- TBD
469
+ There is no extra work required for users to maintain previous behavior, the changes
470
+ caused by this enhancement are backwards compatible.
471
+
472
+ To make use of the enhancement, users will need to update the ` kube-apiserver ` and ` kubelet `
473
+ to at least ` v1.25 ` and turn on feature gate ` SplitStdoutAndStderr ` in both components.
420
474
421
475
### Version Skew Strategy
422
476
@@ -481,7 +535,7 @@ well as the [existing list] of feature gates.
481
535
- Feature gate name: SplitStdoutAndStderr
482
536
- Components depending on the feature gate: kubelet, kube-apiserver
483
537
- [x] Other
484
- - Describe the mechanism:
538
+ - Describe the mechanism: query parameter
485
539
- Will enabling / disabling the feature require downtime of the control
486
540
plane?
487
541
- No.
@@ -491,24 +545,11 @@ well as the [existing list] of feature gates.
491
545
492
546
###### Does enabling the feature change any default behavior?
493
547
494
- <!--
495
- Any change of default behavior may be surprising to users or break existing
496
- automations, so be extremely careful here.
497
- -->
498
- No. This change is backward compatible.
548
+ No. If the query parameter ` stream ` in the url of fetching logs from kube-apiserver is empty or not set,
549
+ combined stdout and stderr is returned.
499
550
500
551
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
501
552
502
- <!--
503
- Describe the consequences on existing workloads (e.g., if this is a runtime
504
- feature, can it break the existing applications?).
505
-
506
- Feature gates are typically disabled by setting the flag to `false` and
507
- restarting the component. No other changes should be necessary to disable the
508
- feature.
509
-
510
- NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
511
- -->
512
553
Yes.
513
554
514
555
###### What happens if we reenable the feature if it was previously rolled back?
@@ -662,6 +703,7 @@ and creating new ones, as well as about cluster-level services (e.g. DNS):
662
703
- Impact of its outage on the feature:
663
704
- Impact of its degraded performance or high-error rates on the feature:
664
705
-->
706
+ No.
665
707
666
708
### Scalability
667
709
@@ -677,44 +719,19 @@ previous answers based on experience in the field.
677
719
678
720
###### Will enabling / using this feature result in any new API calls?
679
721
680
- <!--
681
- Describe them, providing:
682
- - API call type (e.g. PATCH pods)
683
- - estimated throughput
684
- - originating component(s) (e.g. Kubelet, Feature-X-controller)
685
- Focusing mostly on:
686
- - components listing and/or watching resources they didn't before
687
- - API calls that may be triggered by changes of some Kubernetes resources
688
- (e.g. update of object X triggers new updates of object Y)
689
- - periodic API calls to reconcile state (e.g. periodic fetching state,
690
- heartbeats, leader election, etc.)
691
- -->
722
+ No.
692
723
693
724
###### Will enabling / using this feature result in introducing new API types?
694
725
695
- <!--
696
- Describe them, providing:
697
- - API type
698
- - Supported number of objects per cluster
699
- - Supported number of objects per namespace (for namespace-scoped objects)
700
- -->
726
+ No.
701
727
702
728
###### Will enabling / using this feature result in any new calls to the cloud provider?
703
729
704
- <!--
705
- Describe them, providing:
706
- - Which API(s):
707
- - Estimated increase:
708
- -->
730
+ No.
709
731
710
732
###### Will enabling / using this feature result in increasing size or count of the existing API objects?
711
733
712
- <!--
713
- Describe them, providing:
714
- - API type(s):
715
- - Estimated increase in size: (e.g., new annotation of size 32B)
716
- - Estimated amount of new objects: (e.g., new Object X for every existing Pod)
717
- -->
734
+ No.
718
735
719
736
###### Will enabling / using this feature result in increasing time taken by any operations covered by existing SLIs/SLOs?
720
737
@@ -726,18 +743,11 @@ Think about adding additional work or introducing new steps in between
726
743
727
744
[existing SLIs/SLOs]: https://git.k8s.io/community/sig-scalability/slos/slos.md#kubernetes-slisslos
728
745
-->
746
+ No.
729
747
730
748
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
731
749
732
- <!--
733
- Things to keep in mind include: additional in-memory state, additional
734
- non-trivial computations, excessive access to disks (including increased log
735
- volume), significant amount of data sent and/or received over network, etc.
736
- This through this both in small and large cases, again with respect to the
737
- [supported limits].
738
-
739
- [supported limits]: https://git.k8s.io/community//sig-scalability/configs-and-limits/thresholds.md
740
- -->
750
+ No.
741
751
742
752
### Troubleshooting
743
753
0 commit comments