Multiples rate limits for each consumer in the same ingress

#1

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

0 Likes

#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:


0 Likes