Namespace option ignored in some cases
Currently the -n --namespace option seems to be ignored in the use-cases which I have.
My main use-case is that I want to be able to:
$ kubecfg diff dev/myproject.jsonnet
$ kubecfg update dev/myproject.jsonnet
to view changes, then update my dev env - which works fine as the jsonnet doesn't define namespace explicitly so it's using my own from the current context. But I'd then like to:
$ kubecfg diff ci/myproject.jsonnet -n ci-namespace
to verify the changes when using the ci jsonnet. But this just diffs against my own namespace (similar if I kubecfg update -n nonexistentnamespace dev/myproject.jsonnet it doesn't error but deploys using my namespace)
Currently the only way I can achieve this is by explicitly including the namespace metadata in the jsonnet, then call with:
$ kubecfg diff ci/myproject.jsonnet -V namespace=ci-namespace
or similar, but this then requires the same ext var for anyone deploying on dev.
Let's close this issue and move to #103, since I did an independent analysis of the cause there.
Reopening, since some of the details here are diff-specific (namespace in local objects) and separate to #103.
I reproduced in 0.5.0 but I cannot reproduce in 0.6.0; it might be (accidentally?) fixed.