This commit is contained in:
+14
-12
@@ -1,41 +1,43 @@
|
||||
{% for route in routes %}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ site_k8s }}
|
||||
name: {{ route.ingress_name }}
|
||||
namespace: {{ namespace }}
|
||||
{%- if site_type != "docker" %}
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.middlewares: https-redirect@file,retry-upstream@file{% for m in middlewares %},{{ m }}@file{% endfor %}
|
||||
{%- endif %}
|
||||
traefik.ingress.kubernetes.io/router.middlewares: https-redirect@file,retry-upstream@file{% for middleware in route.middleware_refs %},{{ middleware }}{% endfor %}
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ domain }}
|
||||
{%- for alias in aliases %}
|
||||
{% for alias in aliases %}
|
||||
- {{ alias }}
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
secretName: {{ site_k8s }}-tls
|
||||
rules:
|
||||
- host: {{ domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
- path: {{ route.path }}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ site_k8s }}
|
||||
name: {{ route.service_name }}
|
||||
port:
|
||||
number: 80
|
||||
{%- for alias in aliases %}
|
||||
{% for alias in aliases %}
|
||||
- host: {{ alias }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
- path: {{ route.path }}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ site_k8s }}
|
||||
name: {{ route.service_name }}
|
||||
port:
|
||||
number: 80
|
||||
{%- endfor %}
|
||||
{% endfor %}
|
||||
{% if not loop.last %}---
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
{% for artifact in artifacts %}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ site_k8s }}
|
||||
name: {{ artifact.service_name }}
|
||||
namespace: {{ namespace }}
|
||||
{% if artifact.virtual_host %} annotations:
|
||||
traefik.ingress.kubernetes.io/service.passhostheader: "false"
|
||||
{% endif %}
|
||||
spec:
|
||||
type: ExternalName
|
||||
externalName: garage.storage.svc.k8s.sjc001.fritzlab.net
|
||||
externalName: {{ artifact.external_name }}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
{% if not loop.last %}---
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user