|
17 | 17 | ) |
18 | 18 | from registry.models import ResolvedApp |
19 | 19 |
|
20 | | -# Standard ambassador prefix — routes /private/<app>/<user>/<uuid>/ to this |
21 | | -# service. Uses Go template expressions resolved by the controller at |
| 20 | +# Standard ambassador prefix — routes /private/<app>/<user>/<referenceID>/ to |
| 21 | +# the service. Uses Go template expressions resolved by the controller at |
22 | 22 | # deployment time. |
23 | 23 | _AMBASSADOR_PREFIX = ( |
24 | | - "/private/{{ .system.AppClassName }}/{{ .system.UserName }}/{{ .system.UUID }}/" |
25 | | -) |
26 | | - |
27 | | -# AppStore still launches applications with a stable reference ID in NB_PREFIX. |
28 | | -# The helxapp-controller labels Services with its own UUID. Match on the |
29 | | -# controller UUID externally, then rewrite the upstream path back to the |
30 | | -# AppStore reference ID so path-aware apps (pgAdmin, filebrowser, notebooks) |
31 | | -# see the prefix they were configured with at launch time. |
32 | | -_AMBASSADOR_REFERENCE_REWRITE = ( |
33 | | - '/private/{{ .system.AppClassName }}/{{ .system.UserName }}/' |
34 | | - '{{ .system.ReferenceID }}/' |
| 24 | + "/private/{{ .system.AppClassName }}/{{ .system.UserName }}/{{ .system.ReferenceID }}/" |
35 | 25 | ) |
36 | 26 |
|
37 | 27 |
|
@@ -85,7 +75,7 @@ def build_helxapp_spec(app: ResolvedApp, compose_spec: dict) -> HelxAppSpec: |
85 | 75 | if has_service_port and not ambassador_assigned: |
86 | 76 | proxy_rewrite = None |
87 | 77 | if app.proxy_rewrite_enabled: |
88 | | - proxy_rewrite = app.proxy_rewrite_target or _AMBASSADOR_REFERENCE_REWRITE |
| 78 | + proxy_rewrite = app.proxy_rewrite_target or _AMBASSADOR_PREFIX |
89 | 79 | ambassador = AmbassadorSpec( |
90 | 80 | prefix=_AMBASSADOR_PREFIX, |
91 | 81 | ambassador_id=ambassador_id, |
|
0 commit comments