Closed mthssdrbrg closed 5 years ago
Can you verify that this behaviour matches kubectl, otherwise happy to stick with that
Turns out it's actually not, it'll create all resources until it encounters an invalid one (resources.yaml
contains three resources, second one is invalid):
$ kubectl apply -f resources.yaml
deployment.apps/nginx-valid created
error: error parsing resources.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{"nginx--invalid":interface {}(nil)}
This has now been updated to mimic the behaviour of kubectl apply -f <path>
, hopefully this will provide users with a "least surprise" behaviour.
Follow up from #172.
Not entirely sure whether we actually want to return the valid objects, but maybe we do? We should probably mimic what
kubectl apply
does, and I think it fails if the file isn't valid YAML?