I’m trying to configure two rate-plugins with deferents values to two diferents consumers and relate to the same ingress controller but kong only apply the last rate-plugin specified in annotation.
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: user1
username: user1
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: user2
username: user2
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rate-limiting-user1
plugin: rate-limiting
consumerRef: user1
config:
second: 1
month: 10
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rate-limiting-user2
plugin: rate-limiting
consumerRef: user2
config:
second: 50
month: 5000
ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: kong
plugins.konghq.com: rate-limiting-user1, rate-limiting-user2
Is possible? or i need to create another ingress controller ?
Thanks
hbagdi
April 15, 2019, 4:41pm
2
This is currently not possible using the Ingress Controller and CRDs.
You can track the following two issues for any updates on when this would be available:
opened 04:40PM - 15 Apr 19 UTC
closed 11:35PM - 07 Jan 20 UTC
area/feature
## Problem
Currently, a `KongPlugin` of one type can be added once to an Ingr… ess/Service. There are use-cases when multiple such plugins, for a [combination](https://discuss.konghq.com/t/multiples-rate-limits-for-each-consumer-in-the-same-ingress/3262) of a Route and Consumer need to be instantiated.
## Solution
Add support for multiple plugins of the same type in `plugins.konghq.com` annotation.
#250 will also solve problems for cases when a plugin needs to be instantiated at a consumer level and not for a combination of a Consumer and Service.
The solution requires https://github.com/hbagdi/deck/issues/13 to be implemented first, which can then be leveraged by the Ingress Controller to make this possible for database-backed deployments.
opened 06:10PM - 20 Mar 19 UTC
closed 11:47PM - 07 Jun 19 UTC
Currently, plugins can be defined on route level, service level or a combination… of route+consumer and service+consumer.
The controller should be able to configure consumer-only plugin.