From dcd8af9d20d887030c5ae9f40336768bd590dea9 Mon Sep 17 00:00:00 2001 From: KharchenkoMaks Date: Fri, 13 Mar 2026 11:14:05 +0200 Subject: [PATCH 1/2] fix(templates): fix double slashes in paths when virtualDir is set to root --- wproofreader/templates/NOTES.txt | 4 ++-- wproofreader/templates/_helpers.tpl | 9 +++++++++ wproofreader/templates/deployment.yaml | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/wproofreader/templates/NOTES.txt b/wproofreader/templates/NOTES.txt index 01cf799..d7bf662 100644 --- a/wproofreader/templates/NOTES.txt +++ b/wproofreader/templates/NOTES.txt @@ -1,6 +1,6 @@ WProofreader Server has been deployed successfully! -{{- $baseUrl := printf "http%s://%s.%s.svc:%s/%s/" (.Values.useHTTPS | ternary "s" "") (include "wproofreader.fullname" .) - .Release.Namespace (include "wproofreader.servicePort" . | toString) .Values.virtualDir +{{- $baseUrl := printf "http%s://%s.%s.svc:%s%s/" (.Values.useHTTPS | ternary "s" "") (include "wproofreader.fullname" .) + .Release.Namespace (include "wproofreader.servicePort" . | toString) (include "wproofreader.virtualDirBasePath" .) }} Quick start: {{ print $baseUrl }} diff --git a/wproofreader/templates/_helpers.tpl b/wproofreader/templates/_helpers.tpl index e68af12..8551493 100644 --- a/wproofreader/templates/_helpers.tpl +++ b/wproofreader/templates/_helpers.tpl @@ -90,6 +90,15 @@ Insert key/cert pair from file. {{- template "wproofreader.printKeyValue" (dict (last $cert_path) $cert (last $key_path) $key) }} {{- end }} +{{/* +Returns virtualDir as a path prefix: "/wscservice" for "wscservice", or "" for "/" or "". +Append your path directly: {{ include "wproofreader.virtualDirBasePath" . }}/api?cmd=status +*/}} +{{- define "wproofreader.virtualDirBasePath" -}} +{{- $vd := .Values.virtualDir | trimAll "/" -}} +{{- if $vd -}}{{- printf "/%s" $vd -}}{{- end -}} +{{- end }} + {{/* Returns default web port as an integer. */}} diff --git a/wproofreader/templates/deployment.yaml b/wproofreader/templates/deployment.yaml index 75e0dd0..57106d1 100644 --- a/wproofreader/templates/deployment.yaml +++ b/wproofreader/templates/deployment.yaml @@ -44,7 +44,7 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /{{ .Values.virtualDir }} + path: {{ include "wproofreader.virtualDirBasePath" . }}/ port: container-port scheme: {{ if .Values.useHTTPS }}HTTPS{{ else }}HTTP{{ end }} {{- with .Values.livenessProbeOptions }} @@ -52,7 +52,7 @@ spec: {{- end }} readinessProbe: httpGet: - path: "/{{ .Values.virtualDir }}/api?cmd=status" + path: "{{ include "wproofreader.virtualDirBasePath" . }}/api?cmd=status" port: container-port scheme: {{ if .Values.useHTTPS }}HTTPS{{ else }}HTTP{{ end }} {{- with .Values.readinessProbeOptions }} From a647f2daf2fad7c58a9545bde76910c9bcd19e40 Mon Sep 17 00:00:00 2001 From: KharchenkoMaks Date: Fri, 13 Mar 2026 11:21:58 +0200 Subject: [PATCH 2/2] docs(values): replace removed WPR_DOMAIN_NAME with valid extraEnv example --- wproofreader/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wproofreader/values.yaml b/wproofreader/values.yaml index 1b56d36..3030290 100644 --- a/wproofreader/values.yaml +++ b/wproofreader/values.yaml @@ -15,8 +15,8 @@ licenseTicketID: "" # extra environment variables to pass to the container extraEnv: [] # extraEnv: -# - name: WPR_DOMAIN_NAME -# value: "wproofreader.domain-name.com" +# - name: WPR_JVM_MAX_MEMORY_SIZE_MB +# value: "2048" # directory of the service for web and API requests, e.g. http://localhost/wscservice/api?cmd=ver virtualDir: wscservice