Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

k8s: Fix a bug when manifest file ends with '---' #139

Merged
merged 1 commit into from Jun 24, 2020

Conversation

Akasurde
Copy link
Member

SUMMARY

Any kubernetes manifest file ending with '---' will
generate an error when applied using 'k8s' module.

Although this may not be 'legal' YAML, this is quite frequent,
specially on helm's generated manifest files.

migrated from ansible/ansible#59160

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

changelogs/fragments/59160_handle_none_def.yml
plugins/module_utils/raw.py

Any kubernetes manifest file ending with '---' will
generate an error when applied using 'k8s' module.

Although this may not be 'legal' YAML, this is quite frequent,
specially on helm's generated manifest files.

migrated from ansible/ansible#59160

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #139 into master will decrease coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #139      +/-   ##
==========================================
- Coverage   42.56%   42.41%   -0.16%     
==========================================
  Files           3        3              
  Lines         545      547       +2     
  Branches      110      111       +1     
==========================================
  Hits          232      232              
- Misses        270      271       +1     
- Partials       43       44       +1     
Impacted Files Coverage Δ
...s/community/kubernetes/plugins/module_utils/raw.py 43.69% <0.00%> (-0.28%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10b332d...84340da. Read the comment docs.

@willthames
Copy link
Collaborator

It doesn't have to end in --- for this to be a problem either - it can happen in the middle (again, another artifact of helm)

@willthames willthames merged commit 9fb808c into ansible-collections:master Jun 24, 2020
@willthames
Copy link
Collaborator

Thanks @Akasurde

@Akasurde Akasurde deleted the i59160 branch June 25, 2020 03:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants