ansible-role-k8s-ci/templates/gitea/gitea-IngressRoute.yml.j2
Adrien Reslinger 24ded415ec
All checks were successful
continuous-integration/drone/push Build is passing
Rename traefik_domain var to cluster_domain
2022-02-26 00:45:40 +01:00

49 lines
No EOL
1.7 KiB
Django/Jinja

apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: gitea
namespace: gitea
labels:
app.kubernetes.io/name: drone
app.kubernetes.io/instance: gitea
app.kubernetes.io/component: server
annotations:
kubernetes.io/ingress.class: "traefik"
spec:
entryPoints:
- https
routes:
# Match is the rule corresponding to an underlying router.
# Later on, match could be the simple form of a path prefix, e.g. just "/bar",
# but for now we only support a traefik style matching rule.
- match: Host(`gitea.{{ cluster_domain }}`)
# kind could eventually be one of "Rule", "Path", "Host", "Method", "Header",
# "Parameter", etc, to support simpler forms of rule matching, but for now we
# only support "Rule".
kind: Rule
# (optional) Priority disambiguates rules of the same length, for route matching.
priority: 12
{% if ingress_whitelist is defined %}
middlewares:
- name: traefik-ipwhitelist
{% endif %}
services:
- name: gitea
port: 3000
# (default 1) A weight used by the weighted round-robin strategy (WRR).
weight: 1
# (default true) PassHostHeader controls whether to leave the request's Host
# Header as it was before it reached the proxy, or whether to let the proxy set it
# to the destination (backend) host.
passHostHeader: true
responseForwarding:
# (default 100ms) Interval between flushes of the buffered response body to the client.
flushInterval: 100ms
tls:
{% if gitea_certificate is defined %}
secretName: {{ gitea_certificate }}
{% endif %}
options:
name: default
namespace: {{ traefik_namespace }}