config-lint
config-lint copied to clipboard
Parse YAML files containing multiple documents?
I'd like to use config-lint
to check Kubernetes manifests output by kustomize build
. That produces a YAML stream containing multiple documents, like:
apiVersion: v1
kind: Namespace
metadata:
name: project-operator
spec: {}
---
apiVersion: v1
kind: Namespace
metadata:
name: external-secrets
spec: {}
---
apiVersion: v1
kind: Namespace
metadata:
name: gpu-operator-resources
spec: {}
If I try to process this with config-lint
, I get:
$ config-lint -rules rules out.yaml
{
"FilesScanned": [
"out.yaml"
],
"Violations": [],
"ResourcesScanned": []
}
That is, despite config-lint
says that it has checked no resources, even though the file contains many resources.