Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse YAML files containing multiple documents? #223

Open
larsks opened this issue Oct 22, 2021 · 0 comments
Open

Parse YAML files containing multiple documents? #223

larsks opened this issue Oct 22, 2021 · 0 comments

Comments

@larsks
Copy link

larsks commented Oct 22, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant