Skip to content

Commit d61991b

Browse files
authored
feat: iterate over added mfes to add its paths (#72)
1 parent f4c58ae commit d61991b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drydock/patches/caddyfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
}
66
rewrite @favicon_matcher /theming/asset/images/favicon.ico
77

8+
{{ patch("caddyfile-mfe-by-path") }}
9+
810
# Limit profile image upload size
911
request_body /api/profile_images/*/*/upload {
1012
max_size 1MB

drydock/templates/drydock/k8s/ingress/lms.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ spec:
4040
name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %}
4141
port:
4242
number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %}
43+
{% for app_name, app in iter_mfes() %}
44+
- pathType: Prefix
45+
path: "/{{app_name}}"
46+
backend:
47+
service:
48+
name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %}
49+
port:
50+
number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %}
51+
{%- endfor %}
4352
- pathType: Prefix
4453
path: "/"
4554
backend:
@@ -59,6 +68,15 @@ spec:
5968
name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %}
6069
port:
6170
number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %}
71+
{% for app_name, app in iter_mfes() %}
72+
- pathType: Prefix
73+
path: "/{{app_name}}"
74+
backend:
75+
service:
76+
name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %}
77+
port:
78+
number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %}
79+
{%- endfor %}
6280
- pathType: Prefix
6381
path: "/"
6482
backend:

0 commit comments

Comments
 (0)