From d42dcaf146a5f6712f17277494514aba642fd6c7 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 5 Jul 2020 23:27:45 +0200 Subject: [PATCH] Entrypoint are now in variables --- defaults/main.yml | 4 ++++ templates/2.0/traefik-cm.yml.j2 | 10 ++++------ templates/2.1/traefik-cm.yml.j2 | 12 ++++-------- templates/2.2/traefik-cm.yml.j2 | 12 ++++-------- 4 files changed, 16 insertions(+), 22 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index e962414..7ea0c32 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,5 +10,9 @@ traefik_node_selector: - localhost traefik_cpu_limit: 500m traefik_memory_limit: 300Mi +traefik_entrypoints: + - { name: "http", port: 80, proto: "TCP" } + - { name: "https", port: 443, proto: "TCP" } + - { name: "traefik", port: 8080, proto: "TCP" } basic_auth: false diff --git a/templates/2.0/traefik-cm.yml.j2 b/templates/2.0/traefik-cm.yml.j2 index c0476da..e830531 100644 --- a/templates/2.0/traefik-cm.yml.j2 +++ b/templates/2.0/traefik-cm.yml.j2 @@ -6,12 +6,10 @@ data: serversTransport: insecureSkipVerify: true entryPoints: - http: - address: :80 - https: - address: :443 - traefik: - address: :8080 +{% for traefik_entrypoint in traefik_entrypoints %} + {{ traefik_entrypoint.name }}: + address: :{{ traefik_entrypoint.port }} +{% endfor %} providers: kubernetesCRD: throttleDuration: 2s diff --git a/templates/2.1/traefik-cm.yml.j2 b/templates/2.1/traefik-cm.yml.j2 index 950d9e0..e64d65e 100644 --- a/templates/2.1/traefik-cm.yml.j2 +++ b/templates/2.1/traefik-cm.yml.j2 @@ -6,14 +6,10 @@ data: serversTransport: insecureSkipVerify: true entryPoints: - http: - address: :80 - https: - address: :443 - traefik: - address: :8080 - gitea_ssh: - address: :2222 +{% for traefik_entrypoint in traefik_entrypoints %} + {{ traefik_entrypoint.name }}: + address: :{{ traefik_entrypoint.port }} +{% endfor %} providers: kubernetesCRD: throttleDuration: 2s diff --git a/templates/2.2/traefik-cm.yml.j2 b/templates/2.2/traefik-cm.yml.j2 index 950d9e0..e64d65e 100644 --- a/templates/2.2/traefik-cm.yml.j2 +++ b/templates/2.2/traefik-cm.yml.j2 @@ -6,14 +6,10 @@ data: serversTransport: insecureSkipVerify: true entryPoints: - http: - address: :80 - https: - address: :443 - traefik: - address: :8080 - gitea_ssh: - address: :2222 +{% for traefik_entrypoint in traefik_entrypoints %} + {{ traefik_entrypoint.name }}: + address: :{{ traefik_entrypoint.port }} +{% endfor %} providers: kubernetesCRD: throttleDuration: 2s