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

Add option to output in json format #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

QuirkyMarc
Copy link

@QuirkyMarc QuirkyMarc commented Sep 9, 2022

Some of us want/need dumps in json rather than yaml.

  • Add --output-format argument, and validation of the input.
  • Refactored output formatting into output_formatting() function that takes requested format and jq filter as parameters.
  • Changed destination_resource_name definitions to use appropriate suffix (.yaml vs .json)
  • Modified each
    kubectl ... | jq ... | yq ... > ...
    to a new
    kubectl ... | output_formating ... > ...

Some of us want/need dumps in json rather than yaml.

I think this does the trick
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

Successfully merging this pull request may close these issues.

1 participant