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