Skip to content

Commit 19c03f2

Browse files
authored
Merge pull request kubernetes#2455 from seans3/kep-859-update
Updates SIG CLI KEP 859 to new format
2 parents 7e69f3b + 5bea8ed commit 19c03f2

File tree

3 files changed

+201
-11
lines changed

3 files changed

+201
-11
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kep-number: 859
2+
alpha:
3+
approver: "@deads2k"

keps/sig-cli/859-kubectl-headers/README.md

Lines changed: 183 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,30 @@
2424
- [Graduation Criteria](#graduation-criteria)
2525
- [Upgrade / Downgrade Strategy](#upgrade--downgrade-strategy)
2626
- [Version Skew Strategy](#version-skew-strategy)
27+
- [Production Readiness Review Questionnaire](#production-readiness-review-questionnaire)
28+
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
29+
- [Rollout, Upgrade and Rollback Planning](#rollout-upgrade-and-rollback-planning)
30+
- [Monitoring Requirements](#monitoring-requirements)
31+
- [Dependencies](#dependencies)
32+
- [Scalability](#scalability)
2733
- [Implementation History](#implementation-history)
2834
<!-- /toc -->
2935

3036
## Release Signoff Checklist
3137

32-
- [x] kubernetes/enhancements issue in release milestone, which links to KEP (this should be a link to the KEP location in kubernetes/enhancements, not the initial KEP PR)
33-
- [#859](https://github.com/kubernetes/enhancements/issues/859)
34-
- [x] KEP approvers have set the KEP status to `implementable`
35-
- [x] Design details are appropriately documented
36-
- [x] Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
37-
- Standard Unit and Integration testing should be sufficient
38-
- [x] Graduation criteria is in place
39-
- This is not a user facing API change
38+
Items marked with (R) are required *prior to targeting to a milestone / release*.
39+
40+
- [X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
41+
- [X] (R) KEP approvers have approved the KEP status as `implementable`
42+
- [X] (R) Design details are appropriately documented
43+
- [X] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
44+
- [X] (R) Graduation criteria is in place
45+
- [X] (R) Production readiness review completed
46+
- [X] (R) Production readiness review approved
4047
- [ ] "Implementation History" section is up-to-date for milestone
4148
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
42-
- [ ] Supporting documentation e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
49+
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
50+
4351

4452
[kubernetes.io]: https://kubernetes.io/
4553
[kubernetes/enhancements]: https://github.com/kubernetes/enhancements/issues
@@ -257,11 +265,175 @@ included.
257265

258266
### Upgrade / Downgrade Strategy
259267

260-
NA
268+
Not applicable. There are no cluster components affected by this feature.
269+
261270

262271
### Version Skew Strategy
263272

264-
NA
273+
Not applicable. There is nothing required of the API Server, so there
274+
can be no version skew.
275+
276+
## Production Readiness Review Questionnaire
277+
278+
### Feature Enablement and Rollback
279+
280+
* **How can this feature be enabled / disabled in a live cluster?**
281+
282+
This feature is enabled with the KUBECTL_COMMANDS_HEADER environment
283+
variable set on the client command line. Since it only affects the client
284+
kubectl, it does not affect any cluster components.
285+
286+
- [X] Feature gate (also fill in values in `kep.yaml`)
287+
- Feature gate name: KUBECTL_COMMANDS_HEADERS
288+
- Components depending on the feature gate: kubectl
289+
- [X] Other
290+
- Describe the mechanism: setting an client-side environment variable for kubectl.
291+
- Will enabling / disabling the feature require downtime of the control
292+
plane? No
293+
- Will enabling / disabling the feature require downtime or reprovisioning
294+
of a node? (Do not assume `Dynamic Kubelet Config` feature is enabled).
295+
No.
296+
297+
* **Does enabling the feature change any default behavior?**
298+
299+
No. This feature is not user facing, so it does not change behavior.
300+
301+
* **Can the feature be disabled once it has been enabled (i.e. can we roll back
302+
the enablement)?**
303+
304+
Yes. This feature can be disabled by simply removing an environment variable
305+
on the client command line.
306+
307+
* **What happens if we reenable the feature if it was previously rolled back?**
308+
309+
Re-enabling this feature is simply accomplished by setting the feature
310+
environment variable on the client command line. There is no state, and there
311+
is no consequence for re-enabling the feature.
312+
313+
* **Are there any tests for feature enablement/disablement?**
314+
315+
There will be unit tests and integration tests which test this
316+
feature enablement and disablement by setting the environment
317+
variable.
318+
319+
### Rollout, Upgrade and Rollback Planning
320+
321+
* **How can a rollout fail? Can it impact already running workloads?**
322+
323+
A danger in the rollout of this feature is adding too much data (too many
324+
headers) to each of the API Server calls. We intend to mitigate this risk
325+
by defining a MAX_HEADERS concept to ensure the headers to not grow above a
326+
certain size. MAX_HEADERS will provide a mechanism to ensure the headers data
327+
does not grow without bound. As far as cluster workloads, this feature only
328+
affects kubectl; not any cluster components. So it would not be possible to
329+
impact running workloads.
330+
331+
* **What specific metrics should inform a rollback?**
332+
333+
We will measure the **headers-added-round-trip-time** and compare it to the round-trip
334+
time for the same API Server call without headers. This ratio will give us the
335+
performance penalty for adding these headers. If this performance penalty exceedes
336+
a specific threshold, users can opt-out by removing the client-side command line
337+
feature environment variable to disable the headers.
338+
339+
* **Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?**
340+
341+
Enabling and disabling the client-side command line environment variable will
342+
be tested.
343+
344+
* **Is the rollout accompanied by any deprecations and/or removals of features, APIs,
345+
fields of API types, flags, etc.?**
346+
347+
No
348+
349+
### Monitoring Requirements
350+
351+
_This section must be completed when targeting beta graduation to a release._
352+
353+
* **How can an operator determine if the feature is in use by workloads?**
354+
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
355+
checking if there are objects with field X set) may be a last resort. Avoid
356+
logs or events for this purpose.
357+
358+
Operators will see this feature in use when the **X-Kubectl-Command** header
359+
arrives with REST calls to the API Server.
360+
361+
* **What are the SLIs (Service Level Indicators) an operator can use to determine
362+
the health of the service?**
363+
364+
Since the cardinality is low, we will initially support the kubectl subcommand
365+
header (X-Kubectl-Command) in this feature. This simple metric will provide valuable
366+
insight into kubectl usage, and allow users to see if the feature is being used.
367+
368+
- [X] Metrics
369+
- Metric name: X-Kubectl-Command header
370+
- [Optional] Aggregation method:
371+
- Components exposing the metric: kubectl
372+
- [ ] Other (treat as last resort)
373+
- Details:
374+
375+
* **What are the reasonable SLOs (Service Level Objectives) for the above SLIs?**
376+
377+
TBD
378+
379+
* **Are there any missing metrics that would be useful to have to improve observability
380+
of this feature?**
381+
382+
We believe all the other specified **X-Header** will be useful, but we are starting
383+
out simply in alpha to prove the value and feasibility of the feature. We will add
384+
others as we approach beta.
385+
386+
### Dependencies
387+
388+
_This section must be completed when targeting beta graduation to a release._
389+
390+
* **Does this feature depend on any specific services running in the cluster?**
391+
Think about both cluster-level services (e.g. metrics-server) as well
392+
as node-level agents (e.g. specific version of CRI). Focus on external or
393+
optional services that are needed. For example, if this feature depends on
394+
a cloud provider API, or upon an external software-defined storage or network
395+
control plane.
396+
397+
For each of these, fill in the following—thinking about running existing user workloads
398+
and creating new ones, as well as about cluster-level services (e.g. DNS):
399+
- [Dependency name]
400+
- Usage description:
401+
- Impact of its outage on the feature:
402+
- Impact of its degraded performance or high-error rates on the feature:
403+
404+
### Scalability
405+
406+
* **Will enabling / using this feature result in any new API calls?**
407+
408+
No
409+
410+
* **Will enabling / using this feature result in introducing new API types?**
411+
412+
No
413+
414+
* **Will enabling / using this feature result in any new calls to the cloud
415+
provider?**
416+
417+
No
418+
419+
* **Will enabling / using this feature result in increasing size or count of
420+
the existing API objects?**
421+
422+
No
423+
424+
* **Will enabling / using this feature result in increasing time taken by any
425+
operations covered by [existing SLIs/SLOs]?**
426+
427+
Possibly. This feature increases the size of the REST call from kubectl
428+
to the API Server by adding more headers to the calls. We will monitor
429+
this request size increase to ensure there is no deleterious effect.
430+
431+
* **Will enabling / using this feature result in non-negligible increase of
432+
resource usage (CPU, RAM, disk, IO, ...) in any components?**
433+
434+
Possibly. This feature increases the size of the REST call from kubectl
435+
to the API Server by adding more headers to the calls. We will monitor
436+
this request size increase to ensure there is no deleterious effect.
265437

266438
## Implementation History
267439

keps/sig-cli/859-kubectl-headers/kep.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,25 @@ reviewers:
1212
approvers:
1313
- "@seans3"
1414
- "@soltysh"
15+
prr-approvers:
16+
- "@deads2k"
1517
editor: TBD
1618
creation-date: 2019-02-22
1719
last-updated: 2019-02-22
1820
status: implementable
1921
see-also:
2022
replaces:
2123
superseded-by:
24+
stage: alpha
25+
latest-milestone: "v1.21"
26+
milestone:
27+
alpha: "v1.21"
28+
beta: "v1.22"
29+
stable: "v1.24"
30+
# This "Kubectl Commands In Headers" feature is initially opt-in using
31+
# an environment variable. This feature is not user facing.
32+
feature-gates:
33+
- name: kubectl-commands-in-headers
34+
components:
35+
- kubectl
36+
disable-supported: true

0 commit comments

Comments
 (0)