Some checks reported errors
continuous-integration/drone/push Build encountered an error
61 lines
1.9 KiB
Django/Jinja
61 lines
1.9 KiB
Django/Jinja
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: traefik
|
|
labels:
|
|
app: traefik
|
|
annotations:
|
|
kubernetes.io/ingress.class: traefik
|
|
external-dns.alpha.kubernetes.io/hostname: traefik.{{ cluster_domain }}
|
|
external-dns.alpha.kubernetes.io/endpoints-type: NodeExternalIP
|
|
{% if false %}
|
|
# external-dns.alpha.kubernetes.io/endpoints-type: HostIP
|
|
# external-dns.alpha.kubernetes.io/target: "1.2.3.4"
|
|
|
|
# external-dns.alpha.kubernetes.io/ttl: "120"
|
|
# external-dns.alpha.kubernetes.io/cloudflare-proxied: "true"
|
|
{% endif %}
|
|
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
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(`traefik.{{ cluster_domain }}`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
|
|
# 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
|
|
{% if basic_auth is defined or ingress_whitelist is defined %}
|
|
middlewares:
|
|
{% if ingress_whitelist is defined %}
|
|
- name: traefik-ipwhitelist@file
|
|
{% endif %}
|
|
{% if basic_auth is defined %}
|
|
- name: basic-auth@file
|
|
{% endif %}
|
|
{% endif %}
|
|
services:
|
|
- name: api@internal
|
|
kind: TraefikService
|
|
- match: Host(`traefik.{{ cluster_domain }}`) && PathPrefix(`/ping`)
|
|
kind: Rule
|
|
services:
|
|
- name: ping@internal
|
|
kind: TraefikService
|
|
# - match: Host(`traefik.{{ cluster_domain }}`) && PathPrefix(`/metrics`)
|
|
# kind: Rule
|
|
# services:
|
|
# - name: prometheus@internal
|
|
# kind: TraefikService
|
|
|
|
|
|
|
|
tls:
|
|
{% if traefik_dashboard_certificate is defined %}
|
|
secretName: {{ traefik_dashboard_certificate }}
|
|
{% else %}
|
|
secretName: traefik.{{ cluster_domain }}
|
|
{% endif %}
|