-
Couldn't load subscription status.
- Fork 382
Description
kubectl allows plugins with spaces in the name to provide the user experience of sub-commands:
a plugin that wishes to be invoked whenever the command
kubectl foo bar bazis invoked by the user, would have the filename ofkubectl-foo-bar-baz
krew does not allow for this option, because it uses .metadata.name for the plugin name, and this cannot have spaces. Any hyphens in the name get translated to underscores in the filename, which kubectl translates back to hyphens in the command name.
This could be resolved by having an optional field in the Plugin YAML, .spec.command which could be set to an array of strings much like the spec.containers.command field in a Kubernetes Pod. For example:
apiVersion: krew.googlecontainertools.github.com/v1alpha3
kind: Plugin
metadata:
name: foo-bar-baz
spec:
command: ["foo", "bar", "baz"]