Skip to content

Commit e880bbb

Browse files
committed
Add overlapping risk consideration
1 parent 94b4bb1 commit e880bbb

File tree

1 file changed

+9
-4
lines changed
  • keps/sig-cli/3638-built-in-command-shadowing

1 file changed

+9
-4
lines changed

keps/sig-cli/3638-built-in-command-shadowing/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ for external plugins currently.
105105
Because of starting as alpha and this is an explicitly opted-in feature, shadowing functionality will be hidden behind the environment variable
106106
and will only be used after exporting;
107107
```sh
108-
export KUBECTL_ENABLE_ALPHA_CMD_SHADOW=true
108+
export KUBECTL_ENABLE_CMD_SHADOW=true
109109
```
110110

111111
### Notes/Constraints/Caveats
@@ -118,6 +118,11 @@ which other built-in commands will also be requested for this shadowing.
118118

119119
Security considerations are the same with executing other external plugins and there is no additional risk.
120120

121+
In terms of risk considerations, users may adopt external plugins that do not exist as subcommand(e.g. `kubectl create foo`) but afterwards
122+
built-in subcommand with the same name might be added. This brings about a risk about breaking users' scripts which
123+
rely on external plugins. To overcome that problem, there should be a some form of forcing mechanism to select
124+
external plugin instead built-in subcommand. `KUBECTL_ENABLE_CMD_SHADOW` flag can also be used also for that purpose
125+
in later stages.
121126

122127
## Design Details
123128

@@ -231,7 +236,7 @@ functionality is accessed.
231236
Below are some examples to consider, in addition to the aforementioned [maturity levels][maturity-levels].
232237
#### Alpha
233238
234-
- Feature implemented behind a `KUBECTL_ENABLE_ALPHA_CMD_SHADOW=true` environment variable
239+
- Feature implemented behind a `KUBECTL_ENABLE_CMD_SHADOW=true` environment variable
235240
- Initial unit tests
236241
237242
#### Beta
@@ -262,7 +267,7 @@ in back-to-back releases.
262267
-->
263268
#### Alpha
264269

265-
- Feature implemented behind a `KUBECTL_ENABLE_ALPHA_CMD_SHADOW=true` environment variable
270+
- Feature implemented behind a `KUBECTL_ENABLE_CMD_SHADOW=true` environment variable
266271
- Initial unit tests
267272

268273
#### Beta
@@ -352,7 +357,7 @@ well as the [existing list] of feature gates.
352357
- Feature gate name:
353358
- Components depending on the feature gate:
354359
- [x] Other
355-
- Describe the mechanism: Exporting `KUBECTL_ENABLE_ALPHA_CMD_SHADOW=true` environment variable will enable the feature
360+
- Describe the mechanism: Exporting `KUBECTL_ENABLE_CMD_SHADOW=true` environment variable will enable the feature
356361
- Will enabling / disabling the feature require downtime of the control
357362
plane? No
358363
- Will enabling / disabling the feature require downtime or reprovisioning

0 commit comments

Comments
 (0)