Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
juzhiyuan closed issue #2486: question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran URL: https://github.com/apache/apisix-ingress-controller/issues/2486 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
github-actions[bot] commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3690694994 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 [email protected] list. Thank you for your contributions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
felpasl commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3336042497 In my use case, I manage Consumers, Groups, and Plugins via the API. After updating to the latest version, all of these resources were removed from the environment. I had to restore from an etcd backup and downgrade the ingress-controller to recover. My routes, services, and upstreams are managed by CRDs and API calls, while consumers and groups are only managed through API calls. The new version does not seem ready for our workflow yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
juzhiyuan commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3336118279 The mixed use of Admin APIs and CRDs is not a good practice because it complicates the process and hard to know the "final state inside K8s". We are trying to avoid this kind of usage in the new version and future releases. https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/upgrade-guide.md#controller-only-configuration-source -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
juzhiyuan commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3218599083 https://github.com/user-attachments/assets/55612e8a-aee5-40a5-9be0-6a2bbbf543be"; /> https://the-asf.slack.com/archives/CUC5MN17A/p1755870042010789?thread_ts=1755840005.249149&cid=CUC5MN17A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
Baoyuantop commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3218586717 > Hi [@Baoyuantop](https://github.com/Baoyuantop), we would like to use the ingress-controller to synchronize other CRDs such as ApisixRoute and ApisixPluginConfig, but we do not want ApisixConsumer to be synchronized." Hi @smitmistry77, can you explain why this is done this way? This behavior seems strange. In fact, we can use the Gateway API resource [Consumer](https://apisix.apache.org/docs/ingress-controller/reference/apisix-ingress-controller/api-reference/#consumer) to solve this problem, but currently there is a lack of Consumer Group resources, and each consumer needs to be configured repeatedly. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3209951997 We are seeing that the consumers created by the Admin API are getting deleted as there is syncing happening with the CRDs > ingress-controller to etcd -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3209926631 Hi @Baoyuantop, we would like to use the ingress-controller to synchronize other CRDs such as ApisixRoute and ApisixPluginConfig, but we do not want ApisixConsumer to be synchronized." -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
Baoyuantop commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3205401647 > Hi [@Baoyuantop](https://github.com/Baoyuantop) > > > Hi [@Baoyuantop](https://github.com/Baoyuantop) / [@juzhiyuan](https://github.com/juzhiyuan) , Is there any possibility of stopping the sync for the ApisixConsumer? We have a use case where we will create Consumer and ConsumerGroup via Admin API and rest all resources like Apisixroute, ApisixPluginConfig, etc via CRDs. > > Can you help with this question? Hi @smitmistry77, do you have any scenarios where you must use ingress? This usage is contrary to our design and is not recommended. I can't figure out how to stop synchronization. If you want to use the admin API, you can disable ingress. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3204118895 Hi @Baoyuantop > Hi [@Baoyuantop](https://github.com/Baoyuantop) / [@juzhiyuan](https://github.com/juzhiyuan) , Is there any possibility of stopping the sync for the ApisixConsumer? We have a use case where we will create Consumer and ConsumerGroup via Admin API and rest all resources like Apisixroute, ApisixPluginConfig, etc via CRDs. Can you help with this question? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
Baoyuantop commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3204095683 Hi @smitmistry77, We currently support adding plugins to the Consumer using the Gateway API. You can refer to the example at https://apisix.apache.org/docs/ingress-controller/reference/apisix-ingress-controller/examples/#configure-plugin-on-consumer. This method requires you to configure the GatewayClass and Gateway resources first. You can refer to the instructions at https://apisix.apache.org/docs/ingress-controller/getting-started/key-authentication/ > I also want to highlight that if we are creating the "Consumer" and not "ApisixConsumer" then Apisix Ingress Controller is not syncing it. Regarding this problem, have you configured the GatewayClass and Gateway resources? I tested it according to the document and did not encounter the synchronization problem you mentioned. Also, the latest version is 2.0.0-rc3. Can you upgrade to the latest version and try again? If you have any further questions please let us know. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3199580470 Hi @Baoyuantop / @juzhiyuan , Is there any possibility of stopping the sync for the ApisixConsumer? We have a use case where we will create Consumer and ConsumerGroup via Admin API and rest all resources like Apisixroute, ApisixPluginConfig, etc via CRDs. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3182750142 Yes @Baoyuantop, I also checked that ApisixConsumer does not support Plugins configuration. I also want to highlight that if we are creating the "Consumer" and not "ApisixConsumer" then Apisix Ingress Controller is not syncing it. The versions of APISIX and APISIX Ingress controller are below. **APISIX version: 3.13.0-debian APISIX Ingress Controller version: 2.0.0-rc2** Kubernetes version: v1.30.6+rke2r1 Deployment method: Helm chart Operating mode: Decoupled mode with etcd -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
Baoyuantop commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3177513708 > https://docs.api7.ai/apisix/reference/apisix-ingress-controller/examples#configure-plugin-on-consumer - Here it tells that Plugin configuration is not supported for Apsisix Consumer Hi @smitmistry77, We can configure plugins on consumers through the Gateway API: ``` apiVersion: apisix.apache.org/v1alpha1 kind: Consumer metadata: name: consumer-airatelimit-limitcount-lite labels: consumer-type: lite spec: gatewayRef: name: apisix credentials: - type: key-auth name: lite-key-auth config: key: "x" plugins: - name: limit-count config: count: 1 time_window: 60 key: consumer_name key_type: var policy: local rejected_code: 429 rejected_msg: "Too many requests for lite consumer" show_limit_quota_header: true allow_degradation: false ``` Consumer groups are not currently supported, so a temporary solution might require configuring the plugin for each consumer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
Baoyuantop commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3166931608 Hi @smitmistry77, I will use the configuration you provided to verify. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3111649006 Any update will be really helpful here -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3103149809 https://docs.api7.ai/apisix/reference/apisix-ingress-controller/examples#configure-plugin-on-consumer - Here it tells that Plugin configuration is not supported for Apsisix Consumer -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486:
URL:
https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3103134926
Sure @juzhiyuan ,
Let me explain you my usecase: I want to divide the traffic based on the
lite customers (Consumers) and Premium Consumers.
So firstly via Admin API,
Step1: I am creating two consumer groups: LiteConsumerGroup and
PremiumConsumerGroup.
Step2: I am creating one consumer in lite group and associating the
LiteConsumerGroup Id to it, one for PremiumConsumer and associating the
PremiumConsumerGroup id to it.
Step3: I am create a route for a simple call to Upstream.
Step4: I am executing the API.
Below are the API Curls:
**Create lite Consumer Group:**
curl --request PUT \
--url https://localhost:9180/apisix/admin/consumer_groups/lite \
--header 'X-API-KEY: {{Admin_Apikey}}' \
--header 'content-type: application/json' \
--data '{
"plugins": {
"ai-proxy-multi": {
"fallback_strategy": "instance_health_and_rate_limiting",
"instances": [
{
"name": "gemma3-instance",
"provider": "openai-compatible",
"priority": 2,
"weight": 0,
"auth": {
"header": {
"Authorization": ""
}
},
"options": {
"model": "google/gemma-"
},
"override": {
"endpoint": "http://abcd/v1/chat/completions";
}
},
{
"name": "llama4-instance",
"provider": "openai-compatible",
"priority": 1,
"weight": 0,
"auth": {
"header": {
"Authorization": ""
}
},
"options": {
"model": "llama4"
},
"override": {
"endpoint": "http://xyz/v1/chat/completions";
}
}
]
},
"ai-rate-limiting": {
"instances": [
{
"name": "gemma3-instance",
"limit": 20,
"time_window": 60
}
],
"limit_strategy": "prompt_tokens"
},
"limit-count": {
"count": 1,
"time_window": 60,
"rejected_code": 429,
"key_type": "var",
"key": "consumer_name"
}
}
}'
**Create a Premium Consumer Group**
curl --request PUT \
--url https://localhost:9180/apisix/admin/consumer_groups/premium \
--header 'X-API-KEY: {{Admin_Apikey}}' \
--header 'content-type: application/json' \
--data '{
"plugins": {
"ai-proxy-multi": {
"fallback_strategy": "instance_health_and_rate_limiting",
"instances": [
{
"name": "gemma3-instance",
"provider": "openai-compatible",
"priority": 2,
"weight": 0,
"auth": {
"header": {
"Authorization": ""
}
},
"options": {
"model": "google/gemma-"
},
"override": {
"endpoint": "http://abcd/v1/chat/completions";
}
},
{
"name": "llama4-instance",
"provider": "openai-compatible",
"priority": 1,
"weight": 0,
"auth": {
"header": {
"Authorization": ""
}
},
"options": {
"model": "meta-llama/Llama-"
},
"override": {
"endpoint": "http://xyz/v1/chat/completions";
}
}
]
},
"ai-rate-limiting": {
"instances": [
{
"name": "gemma3-instance",
"limit": 30,
"time_window": 60
}
],
"limit_strategy": "prompt_tokens"
},
"limit-count": {
"count": 3,
"time_window": 60,
"rejected_code": 429,
"key_type": "var",
"key": "consumer_name"
}
}
}'
**Lite Consumer**
curl --request PUT \
--url https://localhost:9180/apisix/admin/consumers \
--header 'X-API-KEY: {{Admin_Apikey}}' \
--header 'content-type: application/json' \
--data '{
"username": "consumer-lite",
"plugins": {
"key-auth": {
"key": "x"
}
},
"group_id":"lite"
}'
**Premium Consumer**
curl --request PUT \
--url https://localhost:9180/apisix/admin/consumers \
--header 'X-API-KEY: {{Admin_Apikey}}' \
--header 'content-type: application/json' \
--data '{
"username": "consumer-premium",
"plugins": {
"key-auth": {
"key": ""
}
},
"group_id":"premium"
}'
**Create Route**
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
juzhiyuan commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3102941792 Thanks @smitmistry77, can you please paste all your configurations here with more details? I would like to try them out and confirm. Then we can plan how to resolve the challenge or missed CRD in your case. What do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3102725859 Writing the configuration details again here: APISIX version: 3.13.0-debian APISIX Ingress Controller version: 2.0.0-rc2 Kubernetes version: v1.30.6+rke2r1 Deployment method: Helm chart Operating mode: Decoupled mode with etcd -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [I] question: Consumer created by Admin API is getting deleted when apisix-ingress-router with image: 2.0.0-rc2 is ran [apisix-ingress-controller]
smitmistry77 commented on issue #2486: URL: https://github.com/apache/apisix-ingress-controller/issues/2486#issuecomment-3102702410 Thanks @juzhiyuan , for the response to the query. I want to know, that there are some limitations with CRDs as well in 2.0.0-rc2 like we will not be able to add multiple plugins in ApisixConsumer, like how we are able to do in Admin API. Also if we use Consumer for this case then will it sync from ingress controller - 2.0.0-rc2? Also there is no CRD for consumer groups -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
