forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes#47267 from fabianofranz/kubectl_plugins…
…_v1_part3 Automatic merge from submit-queue (batch tested with PRs 49619, 49598, 47267, 49597, 49638) Flag support in kubectl plugins Adds support to flags in `kubectl` plugins. Flags are declared in the plugin descriptor and are passed to plugins through env vars, similar to global flags (which already works). Fixes kubernetes#49122 **Release note**: ```release-note Added flag support to kubectl plugins ``` PTAL @monopole @kubernetes/sig-cli-pr-reviews
- Loading branch information
Showing
6 changed files
with
208 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
name: env | ||
shortDesc: "The plugin envs plugin" | ||
command: "./env.sh" | ||
flags: | ||
- name: "test1" | ||
desc: "This is a flag 1" | ||
- name: "test2" | ||
desc: "This is a flag 2" | ||
shorthand: "t" | ||
- name: "test3" | ||
desc: "This is a flag 3" | ||
defValue: "default" |