1- {% set terrarium_management_tls_hosts = ([terrarium_manage_domain , terrarium_proxy_domain , terrarium_lxd_domain ] + ([terrarium_auth_domain ] if terrarium_idp_mode == 'local' else [])) | unique | list %}
2- {% macro terrarium_management_tls () %}
1+ {% macro terrarium_host_tls (domain ) %}
32 tls:
43 certResolver: letsencrypt
54 domains:
6- - main: "{{ terrarium_manage_domain }}"
7- sans:
8- {% for domain in terrarium_management_tls_hosts if domain != terrarium_manage_domain %}
9- - "{{ domain }}"
10- {% endfor %}
5+ - main: "{{ domain }}"
116{% endmacro %}
127http:
138 middlewares:
@@ -40,22 +35,22 @@ http:
4035 rule: Host(`{{ terrarium_manage_domain }}`) && PathPrefix(`/oauth2/`)
4136 service: oauth2-proxy
4237 priority: 500
43- {{ terrarium_management_tls( ) }}
38+ {{ terrarium_host_tls(terrarium_manage_domain ) }}
4439 proxy-oauth2:
4540 entryPoints:
4641 - websecure
4742 rule: Host(`{{ terrarium_proxy_domain }}`) && PathPrefix(`/oauth2/`)
4843 service: oauth2-proxy
4944 priority: 500
50- {{ terrarium_management_tls( ) }}
45+ {{ terrarium_host_tls(terrarium_proxy_domain ) }}
5146 cockpit:
5247 entryPoints:
5348 - websecure
5449 rule: Host(`{{ terrarium_manage_domain }}`)
5550 middlewares:
5651 - admin-forward-auth
5752 service: cockpit
58- {{ terrarium_management_tls( ) }}
53+ {{ terrarium_host_tls(terrarium_manage_domain ) }}
5954 traefik-dashboard-root:
6055 entryPoints:
6156 - websecure
@@ -64,21 +59,21 @@ http:
6459 - admin-forward-auth
6560 - traefik-dashboard-root-redirect
6661 service: api@internal
67- {{ terrarium_management_tls( ) }}
62+ {{ terrarium_host_tls(terrarium_proxy_domain ) }}
6863 traefik-dashboard:
6964 entryPoints:
7065 - websecure
7166 rule: Host(`{{ terrarium_proxy_domain }}`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
7267 middlewares:
7368 - admin-forward-auth
7469 service: api@internal
75- {{ terrarium_management_tls( ) }}
70+ {{ terrarium_host_tls(terrarium_proxy_domain ) }}
7671 lxd:
7772 entryPoints:
7873 - websecure
7974 rule: Host(`{{ terrarium_lxd_domain }}`)
8075 service: lxd
81- {{ terrarium_management_tls( ) }}
76+ {{ terrarium_host_tls(terrarium_lxd_domain ) }}
8277{% if terrarium_idp_mode == 'local' %}
8378 zitadel-root:
8479 entryPoints:
@@ -88,14 +83,14 @@ http:
8883 - zitadel-root-rewrite
8984 service: zitadel-login
9085 priority: 400
91- {{ terrarium_management_tls( ) }}
86+ {{ terrarium_host_tls(terrarium_auth_domain ) }}
9287 zitadel-login:
9388 entryPoints:
9489 - websecure
9590 rule: Host(`{{ terrarium_auth_domain }}`) && PathPrefix(`/ui/v2/login`)
9691 service: zitadel-login
9792 priority: 250
98- {{ terrarium_management_tls( ) }}
93+ {{ terrarium_host_tls(terrarium_auth_domain ) }}
9994 zitadel-api-alias:
10095 entryPoints:
10196 - websecure
@@ -104,14 +99,14 @@ http:
10499 - zitadel-strip-api
105100 service: zitadel-api
106101 priority: 200
107- {{ terrarium_management_tls( ) }}
102+ {{ terrarium_host_tls(terrarium_auth_domain ) }}
108103 zitadel-canonical:
109104 entryPoints:
110105 - websecure
111106 rule: Host(`{{ terrarium_auth_domain }}`) && !PathPrefix(`/ui/v2/login`) && !PathPrefix(`/api`) && !Path(`/`)
112107 service: zitadel-api
113108 priority: 100
114- {{ terrarium_management_tls( ) }}
109+ {{ terrarium_host_tls(terrarium_auth_domain ) }}
115110{% endif %}
116111 services:
117112 oauth2-proxy:
0 commit comments