manifests/imagehost/ingress.yaml
songtianlun 1eca4d3fd1 chore: update ingress configurations
- Enable snippet annotations for nginx ingress controller
- Comment out a previous configuration snippet that redirects JPG files

This update allows the use of snippet annotations, giving more control
over ingress configurations. The previously commented snippet
suggested a redirect for JPG files but is now ignored to simplify
configuration and focus on the current requirements.
2025-04-15 11:58:33 +08:00

53 lines
3.1 KiB
YAML

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
namespace: imagehost
annotations:
cert-manager.io/cluster-issuer: "dnspod-cluster-issuer"
#nginx.ingress.kubernetes.io/configuration-snippet: |
# location ~ ^/([^/]+\.jpg)$ {
# return 301 $scheme://$host/i/$1;
# }
spec:
ingressClassName: nginx
tls:
- hosts:
- image.frytea.com
- imagehost-cdn.frytea.com
- cdn-imagehost.frytea.com
secretName: image-frytea-com-tls
rules:
- host: image.frytea.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
name: web
- host: imagehost-cdn.frytea.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
name: web
- host: cdn-imagehost.frytea.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
name: web