diff --git a/drydock/patches/caddyfile b/drydock/patches/caddyfile index 319aa70f..60d244df 100644 --- a/drydock/patches/caddyfile +++ b/drydock/patches/caddyfile @@ -5,6 +5,8 @@ } rewrite @favicon_matcher /theming/asset/images/favicon.ico +{{ patch("caddyfile-mfe-by-path") }} + # Limit profile image upload size request_body /api/profile_images/*/*/upload { max_size 1MB diff --git a/drydock/templates/drydock/k8s/ingress/lms.yml b/drydock/templates/drydock/k8s/ingress/lms.yml index 8ee612aa..4f23a36d 100644 --- a/drydock/templates/drydock/k8s/ingress/lms.yml +++ b/drydock/templates/drydock/k8s/ingress/lms.yml @@ -40,6 +40,15 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{% for app_name, app in iter_mfes() %} + - pathType: Prefix + path: "/{{app_name}}" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endfor %} - pathType: Prefix path: "/" backend: @@ -59,6 +68,15 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{% for app_name, app in iter_mfes() %} + - pathType: Prefix + path: "/{{app_name}}" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endfor %} - pathType: Prefix path: "/" backend: