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

Resource generation - default to yaml, add option for output formats (JSON or YAML) #66

Merged
merged 4 commits into from
Apr 30, 2024

Conversation

jasonmadigan
Copy link
Member

  • Resource generation output format options - default to yaml, add option for output formats (JSON or YAML)
  • Associated docs

Verify

  1. Build locally:

go build or one of the make targets

  1. Sample generation commands:
./kuadrantctl generate gatewayapi httproute --oas examples/oas3/petstore.yaml # defaults to yaml
./kuadrantctl generate gatewayapi httproute --oas examples/oas3/petstore.yaml -o json
./kuadrantctl generate kuadrant ratelimitpolicy --oas examples/oas3/petstore.yaml
./kuadrantctl generate kuadrant authpolicy --oas examples/oas3/petstore-with-oidc-kuadrant-extensions.yaml
./kuadrantctl generate kuadrant ratelimitpolicy --oas examples/oas3/petstore-with-rate-limit-kuadrant-extensions.yaml

# via stdin
cat examples/oas3/petstore-with-rate-limit-kuadrant-extensions.yaml | ./kuadrantctl generate kuadrant ratelimitpolicy --oas -
cat examples/oas3/petstore-with-rate-limit-kuadrant-extensions.yaml | envsubst | ./kuadrantctl generate kuadrant ratelimitpolicy --oas -

@jasonmadigan jasonmadigan marked this pull request as ready for review April 29, 2024 13:55
@jasonmadigan
Copy link
Member Author

@maleck13 fyi: some of this might be of interest for the demo too

@jasonmadigan jasonmadigan requested a review from eguzki April 29, 2024 20:52
Copy link
Collaborator

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Left some minor comments to discuss before approving. But this is ready to be merged.

Verification steps worked as expected. Thanks for those.

cmd/generate_gatewayapi_httproute.go Outdated Show resolved Hide resolved
pkg/utils/external_resource_reader.go Show resolved Hide resolved
@jasonmadigan
Copy link
Member Author

@eguzki made a few tweaks - thanks for the earlier review

@jasonmadigan jasonmadigan merged commit 484dc61 into Kuadrant:main Apr 30, 2024
5 checks passed
@jasonmadigan jasonmadigan deleted the generation-formats branch May 1, 2024 09:45
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.

2 participants