Skip to content

Commit

Permalink
feat: introduce a Name parameter fo KongPlugin CRD
Browse files Browse the repository at this point in the history
This is part of a patchset introducing support for global plugins in
Kong via the ingress controller.
This is a backwards compatible change.

This commit will have long-term effects in how plugins are configured
via Ingress and custom resources as explained below:

Currently, to apply a plugin to one has to add an annotation of the
form:
```
rate-limiting.plugin.konghq.com: plugin-conf
```
where `rate-limiting` is the name of the plugin that needs to be
created while `plugin-conf` is the plugin conf that should be used for
that plugin.

This is not as user-friendly as it should be, especially considering
that different kinds of plugins in Kong have different configuration
objects.

This allows us to keep configuration and plugin names together and in
future the annotations could be much more compact and easier to pass
around:
```
plugin.konghq.com: plugin-conf1,plugin-conf2
```
  • Loading branch information
hbagdi committed Sep 10, 2018
1 parent 0c9ee04 commit 32ca70f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/apis/plugin/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ type KongPlugin struct {

// Config contains the plugin configuration.
Config Configuration `json:"config,omitempty"`

// Name is the name of the plugin to which to apply the config
Name string `json:"name,omitempty"`
}

// KongPluginList is a top-level list type. The client methods for lists are automatically created.
Expand Down

0 comments on commit 32ca70f

Please sign in to comment.