Skip to content

Commit e724ae4

Browse files
authored
Merge pull request #3457 from pacoxu/defualt-container-annotation
KEP-2227: update implementation history
2 parents ba86c57 + 19fcde4 commit e724ae4

File tree

3 files changed

+58
-10
lines changed

3 files changed

+58
-10
lines changed

keps/prod-readiness/sig-cli/2227.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
kep-number: 2227
22
alpha:
33
approver: "@deads2k"
4+
beta:
5+
approver: "@deads2k"
6+
stable:
7+
approver: "@deads2k"

keps/sig-cli/2227-kubectl-default-container/README.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
- [Risks and Mitigations](#risks-and-mitigations)
1717
- [Design Details](#design-details)
1818
- [Test Plan](#test-plan)
19+
- [Testing Strategy](#testing-strategy)
20+
- [Prerequisite testing updates](#prerequisite-testing-updates)
21+
- [Unit tests](#unit-tests)
22+
- [Integration tests](#integration-tests)
23+
- [e2e tests](#e2e-tests)
1924
- [Graduation Criteria](#graduation-criteria)
2025
- [Alpha -> Beta Graduation](#alpha---beta-graduation)
2126
- [Beta -> GA Graduation](#beta---ga-graduation)
@@ -179,13 +184,37 @@ metadata:
179184
```
180185

181186
### Test Plan
187+
188+
#### Testing Strategy
189+
182190
Add a unit test for each command, testing the behavior with the annotation, without the annotation, and with the --container flag
183191

192+
##### Prerequisite testing updates
193+
194+
##### Unit tests
195+
196+
The main unit test is in package under `vendor/k8s.io/kubectl/pkg/`.
197+
198+
- vendor/k8s.io/kubectl/pkg/cmd/exec:2023-01-13 - 68.9%
199+
- vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go:2023-01-13 - 38.1%
200+
- vendor/k8s.io/kubectl/pkg/polymorphichelpers/logsforobject.go:2023-01-13 - 79%
201+
202+
See details in <https://testgrid.k8s.io/sig-testing-canaries#ci-kubernetes-coverage-unit&include-filter-by-regex=kubectl>.
203+
204+
##### Integration tests
205+
206+
N/A
207+
208+
##### e2e tests
209+
210+
[Kubectl logs default container logs](https://github.com/kubernetes/kubernetes/blob/02f893b6e28549a1008d4fc65c40990b87c07830/test/e2e/kubectl/logs.go#L163): <https://storage.googleapis.com/k8s-triage/index.html?sig=cli&test=default%20container%20logs>
211+
184212
### Graduation Criteria
185213

186214
#### Alpha -> Beta Graduation
187215

188216
As this is an opt-in feature, no gate is expected.
217+
189218
- At least 2 release cycles pass to gather feedback and bug reports during
190219
- Documentations, add it to [well-known annotations docs](https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/)
191220
- Add a warning deprecation message when using the annotation `kubectl.kubernetes.io/default-logs-container`
@@ -310,11 +339,26 @@ resource usage (CPU, RAM, disk, IO, ...) in any components?**
310339

311340
## Implementation History
312341

313-
2021-03-10: Alpha implementation completion in 1.21
314-
- https://github.com/kubernetes/kubernetes/pull/97099
315-
- https://github.com/kubernetes/kubernetes/pull/99615
316-
- https://github.com/kubernetes/kubernetes/pull/99581
317-
- https://github.com/kubernetes/kubernetes/pull/99833
342+
2021-03-10(v1.21) Alpha: implementation completion
343+
344+
- <https://github.com/kubernetes/kubernetes/pull/97099>
345+
- <https://github.com/kubernetes/kubernetes/pull/99615>
346+
- <https://github.com/kubernetes/kubernetes/pull/99581>
347+
- <https://github.com/kubernetes/kubernetes/pull/99833>
348+
349+
2021-10-28(v1.24) Beta: make 'kubectl logs' default to the first container when default container cannot be
350+
determined or found by annotations
351+
352+
- <https://github.com/kubernetes/kubernetes/pull/105964>
353+
354+
2022-04-05(v1.25): remove deprecated message of `kubectl.kubernetes.io/default-logs-container`
355+
356+
- <https://github.com/kubernetes/kubernetes/pull/109254>
357+
358+
2023-01-13(v1.27): add an e2e test case
359+
360+
- <https://github.com/kubernetes/kubernetes/pull/115046>
361+
318362

319363
## Drawbacks
320364

keps/sig-cli/2227-kubectl-default-container/kep.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ owning-sig: sig-cli
66
participating-sigs:
77
status: implementable
88
creation-date: 2020-12-16
9-
last-updated: 2021-03-10
9+
last-updated: 2023-01-20
1010
reviewers:
1111
- "@dougsland"
1212
- "@eddiezane"
@@ -19,18 +19,18 @@ approvers:
1919
see-also:
2020

2121
# The target maturity stage in the current dev cycle for this KEP.
22-
stage: alpha
22+
stage: stable
2323

2424
# The most recent milestone for which work toward delivery of this KEP has been
2525
# done. This can be the current (upcoming) milestone, if it is being actively
2626
# worked on.
27-
latest-milestone: "v1.21"
27+
latest-milestone: "v1.27"
2828

2929
# The milestone at which this feature was, or is targeted to be, at each stage.
3030
milestone:
3131
alpha: "v1.21"
32-
beta: "v1.23"
33-
stable: "v1.25"
32+
beta: "v1.24"
33+
stable: "v1.27"
3434

3535
# The following PRR answers are required at alpha release
3636
# List the feature gate name and the components for which it must be enabled

0 commit comments

Comments
 (0)