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

KGO: add guide for kongpluginbinding #8049

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

randmonkey
Copy link
Contributor

@randmonkey randmonkey commented Oct 14, 2024

Description

Add guide page for using KongPluginBinding to configure plugins with Konnect.

Fixes Kong/gateway-operator#568.

Dependent on #8034 for adding navigator page for KGO 1.4.

Testing instructions

Preview link:

Checklist

@randmonkey randmonkey added team-k8s Kubernetes task tracking (including KIC,KGO) review:general Review for general accuracy and presentation. Does the doc work? Does it output correctly? labels Oct 14, 2024
@randmonkey randmonkey added this to the KGO v1.4.x milestone Oct 14, 2024
@randmonkey randmonkey self-assigned this Oct 14, 2024
@randmonkey randmonkey requested a review from a team as a code owner October 14, 2024 06:40
Copy link

netlify bot commented Oct 14, 2024

‼️ Deploy request for kongdocs rejected.

Name Link
🔨 Latest commit 4889778

@randmonkey randmonkey changed the title add guide for kongpluginbinding KGO: add guide for kongpluginbinding Oct 14, 2024
mheap
mheap previously requested changes Oct 14, 2024
Copy link
Member

@mheap mheap left a comment

Choose a reason for hiding this comment

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

@randmonkey Can you please add an example of how to bind to a service and a consumer at the same time?

@randmonkey randmonkey requested a review from mheap October 14, 2024 10:07
Copy link
Member

@programmer04 programmer04 left a comment

Choose a reason for hiding this comment

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

Some nits with suggestions.

I think it may be beneficial to include actual curl commands for testing if something is properly configured from actual client PoV, WDYT?

@lena-larionova lena-larionova force-pushed the kgo/guide_kongpluginbinding branch from f3a95d5 to 2c33a63 Compare October 29, 2024 20:59
Copy link
Contributor

@lena-larionova lena-larionova left a comment

Choose a reason for hiding this comment

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

Can you please update the nav file with the link to this new guide? Otherwise it won't get generated.

You'll need to add an entry to the Guides section here: https://github.com/randmonkey/docs.konghq.com/blob/kgo/guide_kongpluginbinding/app/_data/docs_nav_kgo_1.4.x.yml#L77

with:

- text: Managing Plugin Bindings in Konnect by CRD
  url: /guides/konnect-plugin-binding/

@czeslavo
Copy link
Contributor

We should also mention that depending on the types in the combination, in most of the cases (service + consumer, service + consumer group, route + consumer, route + consumer group), we generate just one Plugin attached to multiple objects, while for others (service + route), we generate a plugin per object.

rate-limiting-minute-10-a0z1x KongPlugin rate-limiting-minute-10 True
```

#### Attaching Plugins to Multiple Entities
Copy link
Member

Choose a reason for hiding this comment

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

I'd add a table to this section showing what combinations of entities will be produced when using konghq.com/plugins annotation.

This can be based on https://github.com/Kong/gateway-operator/blob/f189f2d3972fe08122bb27ead06152132ee791a0/controller/konnect/reconciler_kongplugin_combinations_test.go.

So for instance if service and route have the annotation we produce 2 plugins: 1 for service and 1 for route.

When service and consumer have the annotation: we produce 1 plugin binding both to the plugin.

@Guaris Guaris self-requested a review October 30, 2024 15:49
Copy link
Contributor

@Guaris Guaris left a comment

Choose a reason for hiding this comment

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

added suggestions for title headings according to the style guide
https://docs.konghq.com/contributing/style-guide/#headings-and-page-titles

@Guaris Guaris self-requested a review October 31, 2024 14:13
@pmalek pmalek force-pushed the kgo/guide_kongpluginbinding branch from ba8d057 to 918c312 Compare October 31, 2024 14:20
@pmalek pmalek force-pushed the kgo/guide_kongpluginbinding branch from 918c312 to 9384c6e Compare October 31, 2024 14:36
@pmalek
Copy link
Member

pmalek commented Oct 31, 2024

@randmonkey Can you please add an example of how to bind to a service and a consumer at the same time?

@mheap's point has been addressed in Attaching plugins to multiple entities section

Copy link
Member

@pmalek pmalek left a comment

Choose a reason for hiding this comment

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

I'm OK merging this as is. I'll handle adding the nav entry and note mentioned by @czeslavo in a separate PR.

@Guaris Guaris dismissed mheap’s stale review October 31, 2024 14:45

Dismissing so we can merge.

@pmalek pmalek merged commit 201a79e into Kong:main Oct 31, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:general Review for general accuracy and presentation. Does the doc work? Does it output correctly? team-k8s Kubernetes task tracking (including KIC,KGO)
Projects
None yet
7 participants