Skip to content

Commit

Permalink
feat: iterate over added mfes to add its paths (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrrypg authored Feb 27, 2024
1 parent 1d14cc1 commit f37ecbb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drydock/patches/caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions drydock/templates/drydock/k8s/ingress/lms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit f37ecbb

Please sign in to comment.