Open philippe-granet opened 7 months ago
I think you should replace this: https://github.com/kubernetes-sigs/kubectl-validate/blob/69421c1fde098c82b51f3f46a32a5a948e1fef8e/pkg/utils/yaml.go#L14-L26 by something like this:
func SplitYamlDocuments(fileBytes Document) ([]Document, error) {
var documents [][]byte
decoder := utilyaml.NewDocumentDecoder(ioutil.NopCloser(bytes.NewReader(fileBytes)))
for {
document, err := decoder.Read([]byte{})
...
}
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
What happened?
I can't validate multiple Objects in a Single Manifest
What did you expect to happen?
It should fail if one of the objects in a manifest file is invalid
How can we reproduce it (as minimally and precisely as possible)?
Using a
manifest.yaml
file with multiple Objects:and running
kubectl-validate manifest.yaml
, it return:but it should fail with this error message:
Anything else we need to know?
No response
Kubernetes version