diff --git a/keps/prod-readiness/sig-cli/2227.yaml b/keps/prod-readiness/sig-cli/2227.yaml index 63b8e5301b86..192e0a1913dd 100644 --- a/keps/prod-readiness/sig-cli/2227.yaml +++ b/keps/prod-readiness/sig-cli/2227.yaml @@ -1,3 +1,7 @@ kep-number: 2227 alpha: approver: "@deads2k" +beta: + approver: "@deads2k" +stable: + approver: "@deads2k" \ No newline at end of file diff --git a/keps/sig-cli/2227-kubectl-default-container/README.md b/keps/sig-cli/2227-kubectl-default-container/README.md index 8fd2b7e22652..fa50f1474652 100644 --- a/keps/sig-cli/2227-kubectl-default-container/README.md +++ b/keps/sig-cli/2227-kubectl-default-container/README.md @@ -3,34 +3,41 @@ ## Table of Contents -- [Release Signoff Checklist](#release-signoff-checklist) -- [Summary](#summary) -- [Motivation](#motivation) - - [Goals](#goals) - - [Non-Goals](#non-goals) -- [Proposal](#proposal) - - [Current CLI Behaviors](#current-cli-behaviors) - - [User Stories](#user-stories) - - [Proposal Details](#proposal-details) - - [Notes/Constraints/Caveats](#notesconstraintscaveats) - - [Risks and Mitigations](#risks-and-mitigations) -- [Design Details](#design-details) - - [Test Plan](#test-plan) - - [Graduation Criteria](#graduation-criteria) - - [Alpha -> Beta Graduation](#alpha---beta-graduation) - - [Beta -> GA Graduation](#beta---ga-graduation) - - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) - - [Version Skew Strategy](#version-skew-strategy) -- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire) - - [Feature Enablement and Rollback](#feature-enablement-and-rollback) - - [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning) - - [Monitoring Requirements](#monitoring-requirements) - - [Dependencies](#dependencies) - - [Scalability](#scalability) - - [Troubleshooting](#troubleshooting) -- [Implementation History](#implementation-history) -- [Drawbacks](#drawbacks) -- [Alternatives](#alternatives) +- [KEP-2227: default container behavior](#kep-2227-default-container-behavior) + - [Table of Contents](#table-of-contents) + - [Release Signoff Checklist](#release-signoff-checklist) + - [Summary](#summary) + - [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) + - [Proposal](#proposal) + - [Current CLI Behaviors](#current-cli-behaviors) + - [User Stories](#user-stories) + - [Proposal Details](#proposal-details) + - [Notes/Constraints/Caveats](#notesconstraintscaveats) + - [Risks and Mitigations](#risks-and-mitigations) + - [Design Details](#design-details) + - [Test Plan](#test-plan) + - [Testing Strategy](#testing-strategy) + - [Prerequisite testing updates](#prerequisite-testing-updates) + - [Unit tests](#unit-tests) + - [Integration tests](#integration-tests) + - [e2e tests](#e2e-tests) + - [Graduation Criteria](#graduation-criteria) + - [Alpha -\> Beta Graduation](#alpha---beta-graduation) + - [Beta -\> GA Graduation](#beta---ga-graduation) + - [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy) + - [Version Skew Strategy](#version-skew-strategy) + - [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire) + - [Feature Enablement and Rollback](#feature-enablement-and-rollback) + - [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning) + - [Monitoring Requirements](#monitoring-requirements) + - [Dependencies](#dependencies) + - [Scalability](#scalability) + - [Troubleshooting](#troubleshooting) + - [Implementation History](#implementation-history) + - [Drawbacks](#drawbacks) + - [Alternatives](#alternatives) ## Release Signoff Checklist @@ -179,13 +186,42 @@ metadata: ``` ### Test Plan + +#### Testing Strategy + Add a unit test for each command, testing the behavior with the annotation, without the annotation, and with the --container flag +##### Prerequisite testing updates + + + +##### Unit tests + +The main unit test is in package under `vendor/k8s.io/kubectl/pkg/`. + +- vendor/k8s.io/kubectl/pkg/cmd/exec:2023-01-13 - 68.9% +- vendor/k8s.io/kubectl/pkg/cmd/util/helpers.go:2023-01-13 - 38.1% +- vendor/k8s.io/kubectl/pkg/polymorphichelpers/logsforobject.go:2023-01-13 - 79% + +See details in . + +##### Integration tests + +N/A + +##### e2e tests + +Added in . + ### Graduation Criteria #### Alpha -> Beta Graduation As this is an opt-in feature, no gate is expected. + - At least 2 release cycles pass to gather feedback and bug reports during - Documentations, add it to [well-known annotations docs](https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/) - Add a warning deprecation message when using the annotation `kubectl.kubernetes.io/default-logs-container` @@ -310,12 +346,19 @@ resource usage (CPU, RAM, disk, IO, ...) in any components?** ## Implementation History -2021-03-10: Alpha implementation completion in 1.21 +2021-03-10(v1.21) Alpha: implementation completion - https://github.com/kubernetes/kubernetes/pull/97099 - https://github.com/kubernetes/kubernetes/pull/99615 - https://github.com/kubernetes/kubernetes/pull/99581 - https://github.com/kubernetes/kubernetes/pull/99833 +2021-10-28(v1.24) Beta: make 'kubectl logs' default to the first container when default container cannot be +determined or found by annotations +- https://github.com/kubernetes/kubernetes/pull/105964 + +2022-04-05(v1.25): remove deprecated message of `kubectl.kubernetes.io/default-logs-container` +- https://github.com/kubernetes/kubernetes/pull/109254 + ## Drawbacks It is not generic for other clients like go-client for kubernetes. diff --git a/keps/sig-cli/2227-kubectl-default-container/kep.yaml b/keps/sig-cli/2227-kubectl-default-container/kep.yaml index 35e7cb28c498..873eae3bc018 100644 --- a/keps/sig-cli/2227-kubectl-default-container/kep.yaml +++ b/keps/sig-cli/2227-kubectl-default-container/kep.yaml @@ -6,7 +6,7 @@ owning-sig: sig-cli participating-sigs: status: implementable creation-date: 2020-12-16 -last-updated: 2021-03-10 +last-updated: 2022-08-15 reviewers: - "@dougsland" - "@eddiezane" @@ -22,18 +22,18 @@ prr-approvers: see-also: # The target maturity stage in the current dev cycle for this KEP. -stage: alpha +stage: stable # The most recent milestone for which work toward delivery of this KEP has been # done. This can be the current (upcoming) milestone, if it is being actively # worked on. -latest-milestone: "v1.21" +latest-milestone: "v1.27" # The milestone at which this feature was, or is targeted to be, at each stage. milestone: alpha: "v1.21" - beta: "v1.23" - stable: "v1.25" + beta: "v1.24" + stable: "v1.27" # The following PRR answers are required at alpha release # List the feature gate name and the components for which it must be enabled