Skip to content

How to configure KongPluginBindings to be global #7

@mlavacca

Description

@mlavacca

Problem Statement

#1 introduced the new KongPluginBinding CRD to allow users to bind plugins to specific kong resources. The field PluginRef has been added to the .spec field, and such a field contains the Kind along with the plugin Name. Such a kind field is meant to be used to either refer to KongPlugin or KongClusterPlugin.

Since https://docs.konghq.com/gateway/latest/key-concepts/plugins/#precedence defines the precedence for each entity that can have plugins attached, we could think of just using the KongPluginBinding resource to determine the scope of a plugin. In konnect, no entity attached to a plugin means "global" and so we could do.

A separate effort is about using the pluginBinding to configure regular Kubernetes resources in a Gateway, but that's a separate effort described in #8.

Proposed Solution

  • Get rid of the spec.pluginRef.kind field.
  • Allow kong references to be empty
  • If that's the case, the plugin is global

Additional Information

Acceptance Criteria

  • As a user, I can easily define global plugins in Konnect

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions