apache / apisix-ingress-controller

APISIX Ingress Controller for Kubernetes
https://apisix.apache.org/
Apache License 2.0
996 stars 340 forks source link

feat: Add support for non auth plugins with ApisixConsumer #2069

Closed 223311 closed 2 months ago

223311 commented 9 months ago

Description

Hey Team,

I'm looking to set up a consumer group via CRD, but I'm having trouble finding the specific CRD for that. Additionally, I've created the consumer using the YAML below. How can I incorporate a plugin into this consumer?

apiVersion: apisix.apache.org/v2
kind: ApisixConsumer
metadata:
  name: abc
spec:
  authParameter:
    keyAuth:
      value:
        key: "abc12345"

Any guidance on adding a plugin to this consumer would be appreciated!

Revolyssup commented 9 months ago

@223311 You can configure the auth plugins in Consumer like the one example you have shown. You can see the full schema here - https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/crds/ApisixConsumer.yaml#L24

Revolyssup commented 9 months ago

@223311 Currently ingress-controller doesn't allow configuring consumer group via ingress controller. We can create an issue for adding this feature.

Revolyssup commented 9 months ago

I created a feature request issue for track for supporting consumer group but it doesn't look like it will be next release.https://github.com/apache/apisix-ingress-controller/issues/2070

223311 commented 9 months ago

@223311 You can configure the auth plugins in Consumer like the one example you have shown. You can see the full schema here - https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix-ingress-controller/crds/ApisixConsumer.yaml#L24 @Revolyssup -Sure, I appreciate the response. However, I'm seeking guidance on adding a plugin to the consumer. From the CRD, it seems we can only pass an authentication parameter. If I aim to implement a rate limit for a specific consumer, how can we incorporate that?

Revolyssup commented 9 months ago

@223311 Currently ApisixConsumer CR only supports auth plugins.

Revolyssup commented 9 months ago

@223311 We can keep this issue for track though.

leowmjw commented 9 months ago

@Revolyssup We are also interested in exposing rate limit plugin for the Consumer; if you can provide guidance to my engineers; we'll be happy to contribute a PR

Revolyssup commented 9 months ago

@Revolyssup We are also interested in exposing rate limit plugin for the Consumer; if you can provide guidance to my engineers; we'll be happy to contribute a PR

@AlinsRan Can you confirm if you have any other reservations related to this issue? Should I move this to v1.9 milestone?

Revolyssup commented 9 months ago

@leowmjw You can go ahead and create a PR for this. I can help you on it.

bigfish02 commented 6 months ago

Hi, I want to do this, but I do not know how to make manifests for my changed CRD. It seems you use kubebuilder to generate manifests. Could you give me some advice.

github-actions[bot] commented 3 months ago

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

github-actions[bot] commented 2 months ago

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

fsteccanella commented 1 month ago

Hi, any news on this? Thanks