apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ route.resource_name }} namespace: {{ namespace }} annotations: {%- if not compatibility %} 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/immutable-paths: {{ route.immutable_paths_json | tojson }} site-publish.fritzlab.net/route-path: {{ route.path | tojson }} {%- endif %} 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 %} spec: ingressClassName: traefik tls: - hosts: - {{ domain }} {%- for alias in aliases %} - {{ alias }} {%- endfor %} secretName: {{ site_k8s }}-tls rules: - host: {{ domain }} http: paths: - path: {{ route.path }} pathType: Prefix backend: service: name: {{ route.resource_name }} port: number: 80 {%- for alias in aliases %} - host: {{ alias }} http: paths: - path: {{ route.path }} pathType: Prefix backend: service: name: {{ route.resource_name }} port: number: 80 {%- endfor %}