Skip to content

Commit 2bc3452

Browse files
authored
Fix(operator): Missing custom plugin step (#3756)
* Update operator-dataplane-custom-plugins.md * Update operator-dataplane-custom-plugins.md * Update operator-dataplane-custom-plugins.md * Update operator-dataplane-custom-plugins.md
1 parent 63b5acc commit 2bc3452

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

app/_how-tos/operator-dataplane-custom-plugins.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ prereqs:
3131
routes:
3232
- echo
3333
operator:
34+
konnect:
35+
auth: true
36+
control_plane: true
3437
controllers:
3538
- kongplugininstallation
3639

@@ -79,6 +82,36 @@ docker push $YOUR_REGISTRY_ADDRESS/myheader:1.0.0
7982

8083
In this example, the plugin is available in the public registry (Docker Hub) as `kong/plugin-example:1.0.0`. The following steps use the same source.
8184

85+
{: data-deployment-topology="konnect" }
86+
## Register the plugin schema in Konnect
87+
88+
To see your custom plugin in {{site.konnect_product_name}}, you need to register the schema with your control plane.
89+
90+
First, get your control plane ID:
91+
92+
<!--vale off-->
93+
{% konnect_api_request %}
94+
url: /v2/control-planes?filter%5Bname%5D%5Beq%5D=gateway-control-plane
95+
status_code: 200
96+
method: GET
97+
extract_body:
98+
- name: data[0].id
99+
variable: CONTROL_PLANE_ID
100+
capture: CONTROL_PLANE_ID
101+
jq: ".data[0].id"
102+
{% endkonnect_api_request %}
103+
<!--vale on-->
104+
105+
Run the following command to upload your schema file to your {{site.konnect_short_name}} control plane:
106+
107+
```sh
108+
curl -X POST \
109+
https://us.api.konghq.com/v2/control-planes/$CONTROL_PLANE_ID/core-entities/plugin-schemas \
110+
--header 'Content-Type: application/json' \
111+
--header "Authorization: Bearer $KONNECT_TOKEN" \
112+
--data "{\"lua_schema\": $(jq -Rs . './myheader/schema.lua')}"
113+
```
114+
82115
## Install the plugin
83116

84117
1. Install the plugin using the `KongPluginInstallation` resource. This resource makes the plugin available for instances of {{site.base_gateway}} resources:

0 commit comments

Comments
 (0)