Skip to content

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

Merged
jasonmadigan merged 4 commits into
Kuadrant:mainfrom
jasonmadigan:generation-formats
Apr 30, 2024
Merged

Resource generation - default to yaml, add option for output formats (JSON or YAML)#66
jasonmadigan merged 4 commits into
Kuadrant:mainfrom
jasonmadigan:generation-formats

Conversation

@jasonmadigan

Copy link
Copy Markdown
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
Copy Markdown
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

@eguzki eguzki left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread cmd/generate_gatewayapi_httproute.go Outdated
Comment thread pkg/utils/external_resource_reader.go
@jasonmadigan

Copy link
Copy Markdown
Member Author

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

@jasonmadigan
jasonmadigan merged commit 484dc61 into Kuadrant:main Apr 30, 2024
@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