Flag support in kubectl plugins

This commit is contained in:
Fabiano Franz
2017-06-09 14:19:55 -03:00
parent ebf24c14a9
commit 71cbad7cbb
6 changed files with 208 additions and 42 deletions

View File

@@ -232,7 +232,10 @@ func setupValidPlugins(nPlugins, nChildren int) (string, error) {
descriptor := fmt.Sprintf(`
name: %[1]s
shortDesc: The %[1]s test plugin
command: echo %[1]s`, name)
command: echo %[1]s
flags:
- name: %[1]s-flag
desc: A flag for %[1]s`, name)
if nChildren > 0 {
descriptor += `