Kong / gateway-operator

Kubernetes Operator for Kong Gateways
Apache License 2.0
51 stars 14 forks source link

Konnect Entities: tags created by annotation not limited #778

Closed randmonkey closed 21 minutes ago

randmonkey commented 3 hours ago

Current Behavior

We can add tags to entities by konghq.com/tags annotation. But Konnect has a max number (20) and max length (128) limits on tags. Although we added limits on spec.tags in entities in https://github.com/Kong/kubernetes-configuration/pull/131, we do not have limitations on the tags from annotations. This may bring excessive number or length of tags and make the entity fail to pass validation of Konnect.

Expected Behavior

The summary of tags from annotation, spec.tags, and controller are still within the limit of Konnect

Steps To Reproduce

Operator Version

kubectl version

czeslavo commented 2 hours ago

The intention was to support this at least for a while (similar situation to the plugin relations defined in annotations).

I think we could add a validation rule that will disallow having both konghq.com/tags annotation and the spec.tags field set as that doesn't make much sense.