Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
677 stars 420 forks source link

Redirect to another domain #1567

Open AurimasNav opened 1 year ago

AurimasNav commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

We have migrated to new domain new.domain.com and need to redirect all the users that still use old.domain.com to this new address.

Describe the solution you'd like In application gateway it seems to be doable with redirect routing rule from listener to external site or to another listener, I can't see a way to do it with existing annotations. I guess we would need a CR to create custom routing rule, and then use that with annotation. Maybe it is possible with rewrite rules, but I don't see how as it only seems to rewrite url paths and queries, but not the hostname.

edit: might be related or even duplicate of #534

myspaka commented 4 months ago

We also often have the Situation, that we need to redirect www.domain.com to domain.com. That sould be possible with annotations

rg54 commented 2 months ago

Is there any news on this feature request, and in particular, about supporting K8s services with externalName config ?

Because I work on a project where we use AGIC on prod & preprod platforms, and nginx-ingress on other test platforms (to limit costs). And services with externalName config are supported without any problems on nginx-ingress, but AGIC gives this specific error, unluckily : 1 backendaddresspools.go:102] Code="ErrorFetchingEndpoints" Message="Endpoint not found for core/static-storage-account" 1 context.go:402] Code="ErrorFetchingEndpoints" Message="Endpoint not found for core/static-storage-account"

When I check App Gateway configuration, listener and routing rules are correctly created by AGIC, but it points the the default (empty) backend pool. Moreover, setting FQDN as backend pool value in App Gateway is possible, so at first glance, there is no technical difficulty on App Gateway side to implement this.

Note that it's a bit different from redirection to another domain, but tickets for these 2 different needs seems to have been linked to this same feature request.