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

Enable parsing of yaml stream #7

Open
muskote60 opened this issue May 17, 2019 · 0 comments
Open

Enable parsing of yaml stream #7

muskote60 opened this issue May 17, 2019 · 0 comments

Comments

@muskote60
Copy link

I want to use this tool together with Helm to render kubernetes resource templates and validate them. Helm does output a yaml stream seperated by --- onto stdout. The cmd version of kubeyaml seems to only scan the first yaml structure encountered. To use this tool effectively it should continue until hitting the EOF and validate each section. F.e.

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: confmap
data:
  FOO: bar
---
apiVersion: v1
kind: Service
metadata:
  name: aservice
  spec: wrong indent
---

This is a valid yaml stream. The second section does produce the expected error on the wrong indentation (unknown key) when scanned individually, this is however ignored when read because the first section is valid.

jayme-github added a commit to jayme-github/kubeyaml that referenced this issue Sep 9, 2021
This adds the ability to parse YAML streams (as produced by helm
template/helmfile template). As those tools might spill out empty
manifests and kubeyaml fails on those, I've addd an option to ignore
them.

Fixes chuckha#7
jayme-github added a commit to jayme-github/kubeyaml that referenced this issue Sep 9, 2021
This adds the ability to parse YAML streams (as produced by helm
template/helmfile template). As those tools might spill out empty
manifests and kubeyaml fails on those, I've addd an option to ignore
them.

Fixes chuckha#7
jayme-github added a commit to jayme-github/kubeyaml that referenced this issue Sep 9, 2021
This adds the ability to parse YAML streams (as produced by helm
template/helmfile template). As those tools might spill out empty
manifests and kubeyaml fails on those, I've addd an option to ignore
them.

Fixes chuckha#7
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