-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Docker configuration added support to set WPR_VIRTUAL_DIR to / or "" to serve the application from the root path in WebSpellChecker/wproofreader-docker#83. However, setting virtualDir: / (or virtualDir: "") in the Helm chart values.yaml produces malformed paths in the generated manifests.
Root cause
Path strings in deployment.yaml and NOTES.txt are constructed by directly interpolating .Values.virtualDir into a template string with hardcoded slashes:
path: /{{ .Values.virtualDir }} # becomes //
path: "/{{ .Values.virtualDir }}/api?cmd=status" # becomes ///api?cmd=statusprintf ".../%s/" .Values.virtualDir # becomes .../ /
Expected behavior
virtualDir value |
Liveness path | Readiness path |
|---|---|---|
wscservice (default) |
/wscservice/ |
/wscservice/api?cmd=status |
/ or "" |
/ |
/api?cmd=status |
What should be tested
- Default install (
virtualDir: wscservice) — liveness and readiness probe paths render as/wscservice/and/wscservice/api?cmd=status - Root install (
virtualDir: /) — probe paths render as/and/api?cmd=status, no double slashes - Empty string install (
virtualDir: "") — same as root, no double slashes -
NOTES.txtbase URL renders correctly for all three cases above (no double slashes) -
WPR_VIRTUAL_DIRenv var in the Deployment is passed to the container unchanged (not normalized) - Service is reachable and returns a valid response at
http://localhost/api?cmd=statuswhen deployed withvirtualDir: /
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request