stelligent/config-lint

Parse YAML files containing multiple documents?

larsks opened this issue · 0 comments

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.