1
1
# KEP-2551: kubectl exit code standardization
2
-
2
+ π
3
3
<!-- toc -->
4
4
- [ Release Signoff Checklist] ( #release-signoff-checklist )
5
5
- [ Summary] ( #summary )
@@ -95,6 +95,7 @@ to this specific problem.
95
95
### Non-Goals
96
96
97
97
* Define a different return for each internal kubectl step or each APIServer condition/return
98
+ * Define a return code pattern for kubectl plugins or other external calls (we will recommend, but this is not a goal)
98
99
99
100
## Proposal
100
101
@@ -106,7 +107,7 @@ to this specific problem.
106
107
* Exit codes generated by kubectl itself should be distinct, so as not to be confused with codes from external/subcommands
107
108
* Implement a common way so commands can delegate the exit code normalization to a different function
108
109
109
- ### User Stories (Optional)
110
+ ### User Stories
110
111
111
112
#### Story 1
112
113
Joice, the SRE of a big company is automating the deployment of the infrastructure with a lot of kubectl commands.
@@ -370,35 +371,17 @@ This section must be completed when targeting alpha to a release.
370
371
371
372
###### How can this feature be enabled / disabled in a live cluster?
372
373
373
- <!--
374
- Pick one of these and delete the rest.
375
- -->
376
-
377
- - [ ] Feature gate (also fill in values in ` kep.yaml ` )
378
- - Feature gate name:
379
- - Components depending on the feature gate:
380
- - [ ] Other
381
- - Describe the mechanism:
382
- - Will enabling / disabling the feature require downtime of the control
383
- plane?
384
- - Will enabling / disabling the feature require downtime or reprovisioning
385
- of a node? (Do not assume ` Dynamic Kubelet Config ` feature is enabled).
386
374
375
+ - [X] Feature gate (also fill in values in ` kep.yaml ` )
376
+ - Feature gate name: ENV VAR ` KUBECTL_ERROR_CODES `
377
+
387
378
###### Does enabling the feature change any default behavior?
388
379
389
- <!--
390
- Any change of default behavior may be surprising to users or break existing
391
- automations, so be extremely careful here.
392
- -->
380
+ Yes, kubectl exit codes numbers will change after the FG is enabled
393
381
394
382
###### Can the feature be disabled once it has been enabled (i.e. can we roll back the enablement)?
395
383
396
- <!--
397
- Describe the consequences on existing workloads (e.g., if this is a runtime
398
- feature, can it break the existing applications?).
399
-
400
- NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
401
- -->
384
+ Yes, just remove the Env Var.
402
385
403
386
###### What happens if we reenable the feature if it was previously rolled back?
404
387
0 commit comments