apisix-ingress-controller
apisix-ingress-controller copied to clipboard
http[].match.exprs - ability to refer to the internal nginx variables
Issue description
I need use the $proxy_protocol_server_port variable in the match rules of ApisixRoute to do the http-to-https redirection.
We decided to terminate TLS at the load balancer, hence the annotation of k8s.apisix.apache.org/http-to-https won't work because it depends on $scheme which is always http. The proxy protocol could help with the $proxy_protocol_server_port variable but it demands the ability to be referred.
As a workaround, I created a redirection ApisixRoute and then added the vars match rules manually, for now.
Is there any plan to enable ApisixRoute to refer to arbitary nginx variables? Or better, to support even in native Ingress (e.g. as annotations)?
Regards.
Environment
- your apisix-ingress-controller version (output of
apisix-ingress-controller version --long): 1.2.0 - your Kubernetes cluster version (output of
kubectl version): 1.21.2-eks-0389ca3 - if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (
uname -a): N/A
Previously the "easy to use" was the first thing we considered when we designed this feature. So some specific settings like Query, Header and etc were introduced.
We may add another setting like NginxVar to let People extend this feature, but apparently, it's not so friendly for users. @tao12345666333 What's your idea?
Previously the "easy to use" was the first thing we considered when we designed this feature. So some specific settings like
Query,Headerand etc were introduced.We may add another setting like
NginxVarto let People extend this feature, but apparently, it's not so friendly for users. @tao12345666333 What's your idea?
Sorry, I have too many reminders, I missed this one.
I think we should add this capability so that users can better utilize the capabilities of APISIX.
Previously the "easy to use" was the first thing we considered when we designed this feature. So some specific settings like
Query,Headerand etc were introduced. We may add another setting likeNginxVarto let People extend this feature, but apparently, it's not so friendly for users. @tao12345666333 What's your idea?Sorry, I have too many reminders, I missed this one.
I think we should add this capability so that users can better utilize the capabilities of APISIX.
If no one else, please assign to me
👌
Let me try it, too.
Hi @Iced-Sun ! Please check #1376 and #1466, I think it's done. Maybe we can close this issue. what you think?
Nice to hear that!