Skip to content

Commit

Permalink
feat: iterate over mfes to add ingress lms extra paths (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
Henrrypg authored Feb 26, 2024
1 parent 48ddbea commit 262de10
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 in iter_values_named(suffix="MFE_APP") %}
- 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 in iter_values_named(suffix="MFE_APP") %}
- 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 262de10

Please sign in to comment.