Skip to content

Commit a86925e

Browse files
authored
Merge pull request #3729 from nikhita/subresource-kep-beta
KEP-2590: graduate kubectl subresource support to beta
2 parents 4483c24 + 505daaa commit a86925e

File tree

3 files changed

+54
-22
lines changed

3 files changed

+54
-22
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
kep-number: 2590
22
alpha:
33
approver: "@johnbelamaric"
4+
beta:
5+
approver: "@johnbelamaric"

keps/sig-cli/2590-kubectl-subresource/README.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,21 @@
77
- [Goals](#goals)
88
- [Non-Goals](#non-goals)
99
- [Proposal](#proposal)
10-
- [Notes](#notes)
11-
- [Examples](#examples)
10+
- [Notes/Constraints/Caveats](#notesconstraintscaveats)
11+
- [Examples](#examples)
1212
- [get](#get)
1313
- [patch](#patch)
1414
- [Design Details](#design-details)
1515
- [Subresource support](#subresource-support)
1616
- [Table printer](#table-printer)
1717
- [Test Plan](#test-plan)
18+
- [Unit tests](#unit-tests)
19+
- [Integration tests](#integration-tests)
20+
- [e2e tests](#e2e-tests)
1821
- [Graduation Criteria](#graduation-criteria)
19-
- [Alpha -> Beta Graduation](#alpha---beta-graduation)
20-
- [Beta -> GA Graduation](#beta---ga-graduation)
22+
- [Alpha](#alpha)
23+
- [Beta](#beta)
24+
- [GA](#ga)
2125
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
2226
- [Version Skew Strategy](#version-skew-strategy)
2327
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
@@ -40,11 +44,11 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
4044
- [x] (R) Design details are appropriately documented
4145
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
4246
- [x] (R) Graduation criteria is in place
43-
- [ ] (R) Production readiness review completed
44-
- [ ] (R) Production readiness review approved
47+
- [x] (R) Production readiness review completed
48+
- [x] (R) Production readiness review approved
4549
- [x] "Implementation History" section is up-to-date for milestone
46-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
47-
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
50+
- [x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
51+
- [x] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
4852

4953
<!--
5054
**Note:** This checklist is iterative and should be reviewed and updated every time this enhancement is being considered for a milestone.
@@ -95,12 +99,12 @@ to a different value is *expected behavior*.
9599
If `--subresource` flag is used for a resource that doesn't support the subresource,
96100
a `NotFound` error will be returned.
97101

98-
## Notes
102+
### Notes/Constraints/Caveats
99103

100-
The alpha stage of this KEP does not change any behavior of the `apply` command.
101-
The support for `--subresource` in this command will be added later.
104+
Due to additional complexity and the general purpose of `apply` being a
105+
declarative command, `--subresource` will not be expanded to the `apply` command.
102106

103-
## Examples
107+
### Examples
104108

105109
#### get
106110

@@ -197,17 +201,41 @@ For custom resources:
197201

198202
### Test Plan
199203

200-
- Unit tests, integration and e2e tests will be added.
204+
[x] I/we understand the owners of the involved components may require updates to
205+
existing tests to make this code solid enough prior to committing the changes necessary
206+
to implement this enhancement.
207+
208+
##### Unit tests
209+
210+
- `k8s.io/kubernetes/pkg/printers/internalversion`: `2023-01-12` - 71.2
211+
- `k8s.io/kubernetes/vendor/k8s.io/cli-runtime/pkg/resource`: `2023-01-12` - 70.9
212+
- `k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/edit`: `2023-01-12` - 100
213+
- `k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/get`: `2023-01-12` - 80.7
214+
- `k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/patch`: `2023-01-12` - 56.3
215+
- `k8s.io/kubernetes/vendor/k8s.io/kubectl/pkg/cmd/replace`: `2023-01-12` - 63.6
216+
217+
##### Integration tests
218+
219+
- `kubectl get`: [link to test coverage](https://github.com/kubernetes/kubernetes/blob/4802d7bb62c2623be8e4f940f6b5c1fcddd6c744/test/cmd/get.sh#L178-L184)
220+
221+
##### e2e tests
201222

202223
### Graduation Criteria
203224

204-
#### Alpha -> Beta Graduation
225+
#### Alpha
205226

206-
- [ ] Collect user feedback on adding support of `--subresource` for `apply`
227+
- Add the `--subresource` flag to get, patch, edit and replace commands.
228+
- Unit tests and integration tests are added.
207229

208-
#### Beta -> GA Graduation
230+
#### Beta
231+
232+
- Gather feedback from users.
233+
- e2e tests are added.
234+
235+
#### GA
236+
237+
- User feedback gathered for at least 1 cycle.
209238

210-
- [ ] User feedback gathered for atleast 1 cycle
211239

212240
### Upgrade / Downgrade Strategy
213241

@@ -378,11 +406,12 @@ N/A
378406

379407
2021-03-01: Initial [POC PR] created
380408
2021-04-06: KEP proposed
409+
2021-04-07: [Demo] in SIG CLI meeting
410+
2022-05-25: PR for alpha implementation merged
381411

382412
[POC PR]: https://github.com/kubernetes/kubernetes/pull/99556
413+
[Demo]: https://youtu.be/zUa7dudYCQM?t=299
383414

384415
## Alternatives
385416

386417
Alternatives would be to use curl commands directly to update subresources.
387-
388-

keps/sig-cli/2590-kubectl-subresource/kep.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ approvers:
1212
- "@soltysh"
1313

1414
creation-date: 2021-04-06
15-
last-updated: 2022-01-20
15+
last-updated: 2023-01-12
1616

1717
status: implementable
18-
stage: alpha
18+
stage: beta
1919

20-
latest-milestone: "v1.24"
20+
latest-milestone: "v1.27"
2121

2222
milestone:
2323
alpha: "v1.24"
24+
beta: "v1.27"

0 commit comments

Comments
 (0)