Kong / gateway-operator

Kubernetes Operator for Kong Gateways
Apache License 2.0
50 stars 15 forks source link

Konnect entities: Gateway Control Plane Group - Control Plane Group Memberships #449

Closed pmalek closed 1 month ago

pmalek commented 3 months ago

Problem statement

Introduce ControlPlane group membership for KonnectControlPlane.

For details see https://docs.google.com/document/d/1TxW2ovqPRm-w1td1e_V0CyaET4lpiEBCJ7hiYMZJqng/edit#heading=h.i2q1r7wb62uu

Proposed solution

Prerequisites

Acceptance criteria

pmalek commented 2 months ago

Blocked by lacking KHCP changes (details in linked slack thread).

pmalek commented 1 month ago

KHCP ticket in progress: https://konghq.atlassian.net/browse/KHCP-13304

pmalek commented 1 month ago

https://github.com/Kong/khcp/pull/8011 implemented support for empty arrays.

There's an investigation ongoing checking why allowing empty arrays doesn't work :

curl  -H 'Content-Type: application/json' -H "Authorization: Bearer ${KONNECT_TOKEN}" -XPUT https://eu.api.konghq.tech/v2/control-planes/xxxxxxxxxxxxxx/group-memberships --data '{"members":[]}'
{"status":400,"title":"Invalid Request","instance":"kong:trace:15106412113331495426","detail":"Invalid Parameters","invalid_parameters":[{"field":"members","rule":"array_not_empty","choices":[],"reason":"members should not be empty"}]}%
pmalek commented 1 month ago

This has now been fixed https://github.com/Kong/khcp/pull/8014 and deployed to dev.