Open prachirp opened 4 years ago
The parse is not doing by SDK but by this library. I don't find an option to resolve this ambiguity. However we can have 2 work arounds.
-d='--use-kube=false ...'
.-d ' --use-kube=false ...'
(Note the leading space) then trim the string.If we want to avoid such special ways, we may need to change to other arg parse library.
@frankfarzan Frank you committed the parser code, what do you think?
Thanks, the e2e tests currently use a third workaround -d--use-kube=false
(https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/tests/istioctl_analyze.sh#L38)
@prachirp Is this still a blocker for you?
Ideally, all functions should be run by kpt
CLI and not directly by docker.
When running imperatively via the CLI, the flags are converted to a ConfigMap
and passed as part .functionConfig
field of the input ResourceList
. As a result, there shouldn't be a flag parsing by the SDK.
Given this, what is this blocking exactly? istioctl example package should be using the CLI.
The SDK is trying to parse the --use-kube=false itself instead of passing it to the istioctl-analyze function as a function config literal.