vmware-archive / kubecfg

A tool for managing complex enterprise Kubernetes environments as code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`apply -f *.jsonnet` applies only the first Jsonnet file

hausdorff opened this issue · comments

I think, anyway. It only deploys one of them. Relatedly, if you continue to supply filenames after the first, then apply seems to ignore them.

Reproducing this bug seems to produce the following behavior if there is more than one *.jsonnet file in the targeted directory:

➜  kubecfg git:(apply-fix) ✗ ./kubecfg apply -f examples/*.jsonnet                       
ERROR No ksonnet application found

We investigated that this is the default behavior for kubectl; to not take a string array.

./kubecfg apply -f examples/*.jsonnet expands to ./kubecfg apply -f examples/test.jsonnet examples/test2.jsonnet, and examples/test2.jsonnet is used as the environment name, hence the error in the above comment.