This commit is contained in:
parent
a5a52b15c8
commit
c0bfc09c8c
5 changed files with 21 additions and 20 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
my_context: kubernetes
|
my_context: kubernetes
|
||||||
traefik_version: "2.5.6"
|
traefik_version: "2.6.1"
|
||||||
traefik_domain: "local"
|
cluster_domain: "local"
|
||||||
traefik_namespace: "traefik"
|
traefik_namespace: "traefik"
|
||||||
|
traefik_service_type: LoadBalancer
|
||||||
#ingress_whitelist:
|
#ingress_whitelist:
|
||||||
# - 10.96.0.0/12
|
# - 10.96.0.0/12
|
||||||
# - 10.244.0.0/16
|
# - 10.244.0.0/16
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
apiVersion: cert-manager.io/v1
|
apiVersion: cert-manager.io/v1
|
||||||
kind: Certificate
|
kind: Certificate
|
||||||
metadata:
|
metadata:
|
||||||
name: traefik.{{ traefik_domain }}
|
name: traefik.{{ cluster_domain }}
|
||||||
spec:
|
spec:
|
||||||
dnsNames:
|
dnsNames:
|
||||||
- traefik.{{ traefik_domain }}
|
- traefik.{{ cluster_domain }}
|
||||||
issuerRef:
|
issuerRef:
|
||||||
name: letsencrypt-prod
|
name: letsencrypt-prod
|
||||||
kind: ClusterIssuer
|
kind: ClusterIssuer
|
||||||
secretName: traefik.{{ traefik_domain }}
|
secretName: traefik.{{ cluster_domain }}
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,13 @@ data:
|
||||||
# users:
|
# users:
|
||||||
# - {{ basic_auth_data }}
|
# - {{ basic_auth_data }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if false %}
|
||||||
authelia:
|
authelia:
|
||||||
forwardAuth:
|
forwardAuth:
|
||||||
address: "http://authelia:9091/api/verify?rd=https://login.example.com/"
|
address: "http://authelia:9091/api/verify?rd=https://login.example.com/"
|
||||||
trustForwardHeader: true
|
trustForwardHeader: true
|
||||||
authReponseHeaders: ["Remote-User", "Remote-Groups", "Remote-Name", "Remote-Email"]
|
authReponseHeaders: ["Remote-User", "Remote-Groups", "Remote-Name", "Remote-Email"]
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
traefik-tls-defaults-options.yaml: |
|
traefik-tls-defaults-options.yaml: |
|
||||||
tls:
|
tls:
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
image:
|
#image:
|
||||||
tag: "{{ traefik_version }}"
|
# tag: "{{ traefik_version }}"
|
||||||
additionalArguments:
|
additionalArguments:
|
||||||
- --configFile=/etc/traefik/traefik.yaml
|
- --configFile=/etc/traefik/traefik.yaml
|
||||||
#podSecurityPolicy:
|
#podSecurityPolicy:
|
||||||
# enabled: true
|
# enabled: true
|
||||||
service:
|
service:
|
||||||
|
type: {{ traefik_service_type }}
|
||||||
{% if traefik_external_ips is defined %}
|
{% if traefik_external_ips is defined %}
|
||||||
type: ClusterIP
|
|
||||||
externalIPs:
|
externalIPs:
|
||||||
{% for external_ip in traefik_external_ips %}
|
{% for external_ip in traefik_external_ips %}
|
||||||
- {{ external_ip }}
|
- {{ external_ip }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% elseif %}
|
|
||||||
type: LoadBalancer
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
ingressRoute:
|
ingressRoute:
|
||||||
dashboard:
|
dashboard:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
# Match is the rule corresponding to an underlying router.
|
# 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",
|
# 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.
|
# but for now we only support a traefik style matching rule.
|
||||||
- match: Host(`traefik.{{ traefik_domain }}`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
|
- match: Host(`traefik.{{ cluster_domain }}`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
|
||||||
# kind could eventually be one of "Rule", "Path", "Host", "Method", "Header",
|
# kind could eventually be one of "Rule", "Path", "Host", "Method", "Header",
|
||||||
# "Parameter", etc, to support simpler forms of rule matching, but for now we
|
# "Parameter", etc, to support simpler forms of rule matching, but for now we
|
||||||
# only support "Rule".
|
# only support "Rule".
|
||||||
|
|
@ -20,25 +20,25 @@ spec:
|
||||||
{% if basic_auth is defined or ingress_whitelist is defined %}
|
{% if basic_auth is defined or ingress_whitelist is defined %}
|
||||||
middlewares:
|
middlewares:
|
||||||
{% if ingress_whitelist is defined %}
|
{% if ingress_whitelist is defined %}
|
||||||
- name: traefik-ipwhitelist
|
- name: traefik-ipwhitelist@file
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if basic_auth is defined %}
|
{% if basic_auth is defined %}
|
||||||
- name: basic-auth
|
- name: basic-auth@file
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
services:
|
services:
|
||||||
- name: api@internal
|
- name: api@internal
|
||||||
kind: TraefikService
|
kind: TraefikService
|
||||||
- match: Host(`traefik.{{ traefik_domain }}`) && PathPrefix(`/ping`)
|
- match: Host(`traefik.{{ cluster_domain }}`) && PathPrefix(`/ping`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: ping@internal
|
- name: ping@internal
|
||||||
kind: TraefikService
|
kind: TraefikService
|
||||||
- match: Host(`traefik.{{ traefik_domain }}`) && PathPrefix(`/metrics`)
|
# - match: Host(`traefik.{{ cluster_domain }}`) && PathPrefix(`/metrics`)
|
||||||
kind: Rule
|
# kind: Rule
|
||||||
services:
|
# services:
|
||||||
- name: prometheus@internal
|
# - name: prometheus@internal
|
||||||
kind: TraefikService
|
# kind: TraefikService
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -46,5 +46,5 @@ spec:
|
||||||
{% if traefik_dashboard_certificate is defined %}
|
{% if traefik_dashboard_certificate is defined %}
|
||||||
secretName: {{ traefik_dashboard_certificate }}
|
secretName: {{ traefik_dashboard_certificate }}
|
||||||
{% else %}
|
{% else %}
|
||||||
secretName: traefik.{{ traefik_domain }}
|
secretName: traefik.{{ cluster_domain }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue