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

Missing kind causes TypeError with multi-doc input #9

Open
jstol opened this issue May 28, 2019 · 0 comments
Open

Missing kind causes TypeError with multi-doc input #9

jstol opened this issue May 28, 2019 · 0 comments

Comments

@jstol
Copy link

jstol commented May 28, 2019

Error Description

The check for a kind of 'List' in the manifests(...) function within kubeyaml.py (see here) causes a TypeError to be thrown when a subdocument is missing the kind field. I noticed this when pushing a multi-document manifest to a Flux-enabled repo. For example:

---
# This is a comment to mark that all documents below are Deployment configs
---
apiVersion: apps/v1beta2
kind: Deployment
...

Stack Trace

Traceback (most recent call last):
  File \"kubeyaml.py\", line 238, in <module>
  File \"kubeyaml.py\", line 233, in main
  File \"kubeyaml.py\", line 66, in apply_to_yaml
  File \"site-packages/ruamel/yaml/main.py\", line 452, in dump_all
  File \"kubeyaml.py\", line 73, in update_image
  File \"kubeyaml.py\", line 116, in manifests
TypeError: 'NoneType' object has no attribute '__getitem__'
Failed to execute script kubeyaml"

Additional Info

This error popped up after generating a multi-doc manifest file using a templated Helm chart. It formats the file in a style similar to this to mark which file each sub-document originated from.

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