feat(kongctl): Generate kongctl examples for event gateway entities#5236
Open
lena-larionova wants to merge 5 commits into
Open
feat(kongctl): Generate kongctl examples for event gateway entities#5236lena-larionova wants to merge 5 commits into
lena-larionova wants to merge 5 commits into
Conversation
✅ Deploy Preview for kongdeveloper ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
77e2e01 to
d6e8c6b
Compare
ae9eb77 to
183a709
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new kongctl output format to the site’s entity_example rendering pipeline, then enables it across Event Gateway entity reference pages and Event Gateway policy examples so users can copy/paste declarative kongctl YAML.
Changes:
- Introduces a
kongctlpresenter + include templates forentity_exampleblocks and wires the format intoentity_examplesconfig. - Enables
kongctlas an available tool/format on Event Gateway entity reference pages and Event Gateway policy example YAMLs. - Updates the Event Gateway landing page to link to kongctl, and prevents plugin generators from emitting unsupported
kongctlexamples.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| app/event-gateway/entities/virtual-cluster.md | Adds kongctl as a supported example format and aligns entity type with presenter expectations. |
| app/event-gateway/entities/tls-trust-bundle.md | Enables kongctl examples for the TLS trust bundle entity page. |
| app/event-gateway/entities/static-key.md | Enables kongctl examples for the static key entity page. |
| app/event-gateway/entities/schema-registry.md | Enables kongctl examples for the schema registry entity page. |
| app/event-gateway/entities/policy.md | Enables kongctl examples for the policy entity page. |
| app/event-gateway/entities/listener.md | Enables kongctl examples for the listener entity page. |
| app/event-gateway/entities/backend-cluster.md | Enables kongctl examples for the backend cluster entity page. |
| app/_plugins/generators/plugins/plugin.rb | Excludes kongctl from plugin example generation to avoid unsupported format output. |
| app/_plugins/drops/entity_example/presenters/kongctl.rb | Implements kongctl presenter(s) for Event Gateway entities and policies. |
| app/_plugins/drops/entity_example/formatted_example.rb | Registers the kongctl format so presenters can be resolved. |
| app/_landing_pages/event-gateway.yaml | Adds kongctl to “Tools to manage” list and updates UI/API links. |
| app/_includes/components/entity_example/format/snippets/kongctl.md | Adds the YAML snippet renderer for kongctl examples. |
| app/_includes/components/entity_example/format/kongctl.md | Adds kongctl example wrapper text + variable replacement callout. |
| app/_event_gateway_policies/tls-server/examples/tls-connection.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/skip-record/examples/skip-based-on-name.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/skip-record/examples/nested-policy.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-produce/examples/validate-subset-json.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-produce/examples/validate-all-confluent.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-produce/examples/validate-a-topic.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-consume/examples/validate-subset-json.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-consume/examples/validate-all-confluent.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/schema-validation-consume/examples/validate-a-topic.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/modify-headers/examples/remove-and-replace-header.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/modify-headers/examples/nested-policy.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/modify-headers/examples/add-header-based-on-condition.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/forward-to-virtual-cluster/examples/sni-routing.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/forward-to-virtual-cluster/examples/sni-routing-shared-suffix.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/forward-to-virtual-cluster/examples/port-mapping.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/encrypt/examples/encrypt-with-static-key.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/encrypt/examples/encrypt-with-aws.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/decrypt/examples/decrypt-with-static-key.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/decrypt/examples/decrypt-with-aws.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/acl/examples/read-only-topic.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/acl/examples/match-claims-using-expressions.yml | Adds kongctl to supported tools for the example. |
| app/_event_gateway_policies/acl/examples/manage-consumer-groups.yml | Adds kongctl to supported tools for the example. |
| app/_data/entity_examples/config.yml | Registers kongctl as a format and adds Event Gateway placeholder variable definitions. |
Comment on lines
20
to
+23
| tools: | ||
| - konnect-api | ||
| - terraform | ||
| - kongctl |
Contributor
Author
There was a problem hiding this comment.
This is true, however it's not related to changes in this PR. Will fix separately.
| end | ||
|
|
||
| def child_key | ||
| ENTITY_TO_CHILD_KEY[entity_type] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Introduces
kongctlas an example format for Event Gateway entities and policies.To do:
kongctl applyvskongctl sync?Preview Links
Any event gateway policy example, e.g.:
https://deploy-preview-5236--kongdeveloper.netlify.app/event-gateway/policies/acl/examples/manage-consumer-groups/?format=kongctl
All the event gateway entity references:
https://deploy-preview-5236--kongdeveloper.netlify.app/event-gateway/entities/ - go to a doc, scroll to "Set up a [entity]", and open the kongctl tab.
For example:
https://deploy-preview-5236--kongdeveloper.netlify.app/event-gateway/entities/backend-cluster/#set-up-a-backend-cluster/?tab=kongctl