Skip to content

feat(kongctl): Generate kongctl examples for event gateway entities#5236

Open
lena-larionova wants to merge 5 commits into
mainfrom
feat/kongctl-event-gateway-examples
Open

feat(kongctl): Generate kongctl examples for event gateway entities#5236
lena-larionova wants to merge 5 commits into
mainfrom
feat/kongctl-event-gateway-examples

Conversation

@lena-larionova
Copy link
Copy Markdown
Contributor

@lena-larionova lena-larionova commented May 14, 2026

Description

Introduces kongctl as an example format for Event Gateway entities and policies.

To do:

  • Test all of them (I've only tested some)
  • Add intro text to examples, link to kongctl
  • Add kongctl to event gateway landing page
  • Not sure about this: what level of detail should we provide? Is including the config snippet, similar to decK, enough? Or does this need more handholding, ie examples of how to use an external ref, or how to use kongctl apply vs kongctl sync?
  • Build didn't fail locally, but now it's failing in the PR, and I think it's because of llm format. Need to look into that.

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

@lena-larionova lena-larionova self-assigned this May 14, 2026
@lena-larionova lena-larionova added do not merge Issues/ PRs whose changes should not be merged at this time docs-improvements product:kongctl labels May 14, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit 183a709
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a079b4d51ef100008e1ac37
😎 Deploy Preview https://deploy-preview-5236--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@lena-larionova lena-larionova force-pushed the feat/kongctl-event-gateway-examples branch from 77e2e01 to d6e8c6b Compare May 14, 2026 18:17
@lena-larionova lena-larionova force-pushed the feat/kongctl-event-gateway-examples branch from ae9eb77 to 183a709 Compare May 15, 2026 22:16
@lena-larionova lena-larionova marked this pull request as ready for review May 15, 2026 22:20
@lena-larionova lena-larionova requested a review from a team as a code owner May 15, 2026 22:20
Copilot AI review requested due to automatic review settings May 15, 2026 22:20
@lena-larionova lena-larionova added this to the kongctl GA milestone May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 kongctl presenter + include templates for entity_example blocks and wires the format into entity_examples config.
  • Enables kongctl as 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 kongctl examples.

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

Choose a reason for hiding this comment

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

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Issues/ PRs whose changes should not be merged at this time docs-improvements product:kongctl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants