alibaba / higress

🤖 AI Gateway | AI Native API Gateway
https://higress.io
Apache License 2.0
2.9k stars 478 forks source link

higress支持nginx.ingress.kubernetes.io/server-alias #859

Open qixiaobo opened 7 months ago

qixiaobo commented 7 months ago

Why do you need it?

使用支持相关注解 规避相同配置需要多次重复

How could it be?

https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#server-alias

Other related information

Add any other context or screenshots about the feature request here.

qixiaobo commented 7 months ago

Server Alias Allows the definition of one or more aliases in the server definition of the NGINX configuration using the annotation nginx.ingress.kubernetes.io/server-alias: "<alias 1>,<alias 2>". This will create a server with the same configuration, but adding new values to the server_name directive.

Note

A server-alias name cannot conflict with the hostname of an existing server. If it does, the server-alias annotation will be ignored. If a server-alias is created and later a new server with the same hostname is created, the new server configuration will take place over the alias configuration.

For more information please see the server_name documentation.

johnlanni commented 7 months ago

cc @SpecialYang