Files
site-publish/templates/ingress.yaml.j2
T

44 lines
1.3 KiB
Django/Jinja
Raw Normal View History

2026-05-06 08:07:28 -05:00
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ route.resource_name }}
2026-05-06 08:07:28 -05:00
namespace: {{ namespace }}
annotations:
site-publish.fritzlab.net/artifact: {{ route.artifact | tojson }}
site-publish.fritzlab.net/access: {{ route.access | tojson }}
site-publish.fritzlab.net/bucket: {{ route.artifact_config.bucket | tojson }}
site-publish.fritzlab.net/route-path: {{ route.path | tojson }}
traefik.ingress.kubernetes.io/router.middlewares: https-redirect@file,retry-upstream@file{% if route.access_middleware %},{{ route.access_middleware }}@file{% endif %}{% for m in route.middlewares %},{{ m }}@file{% endfor %}
2026-05-06 08:07:28 -05:00
spec:
ingressClassName: traefik
tls:
- hosts:
- {{ domain }}
{%- for alias in aliases %}
- {{ alias }}
{%- endfor %}
secretName: {{ site_k8s }}-tls
rules:
- host: {{ domain }}
http:
paths:
- path: {{ route.path }}
2026-05-06 08:07:28 -05:00
pathType: Prefix
backend:
service:
name: {{ route.resource_name }}
2026-05-06 08:07:28 -05:00
port:
number: 80
{%- for alias in aliases %}
- host: {{ alias }}
http:
paths:
- path: {{ route.path }}
2026-05-06 08:07:28 -05:00
pathType: Prefix
backend:
service:
name: {{ route.resource_name }}
2026-05-06 08:07:28 -05:00
port:
number: 80
{%- endfor %}