From e07f73dce73952b5a7aa4f474a8c78d92b15bc53 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste WITTNER <44366963+jbwittner@users.noreply.github.com> Date: Wed, 24 Jul 2024 22:58:04 +0200 Subject: [PATCH] [Helm][K8S] Add rootPath helm (#1593) * Update of values.yaml to use a new variable to manage the application rootpath * Use rootPath of values in deployment to manage rootPath and probes --- chart/stirling-pdf/templates/deployment.yaml | 8 +++++--- chart/stirling-pdf/values.yaml | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/chart/stirling-pdf/templates/deployment.yaml b/chart/stirling-pdf/templates/deployment.yaml index 290a56c9..d91e8097 100644 --- a/chart/stirling-pdf/templates/deployment.yaml +++ b/chart/stirling-pdf/templates/deployment.yaml @@ -62,8 +62,10 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.containerSecurityContext | nindent 10 }} -{{- if .Values.envs }} env: + - name: SYSTEM_ROOTURIPATH + value: {{ .Values.rootPath}} +{{- if .Values.envs }} {{ toYaml .Values.envs | indent 8 }} {{- end }} {{- if .Values.extraArgs }} @@ -75,13 +77,13 @@ spec: containerPort: 8080 livenessProbe: httpGet: - path: / + path: {{ .Values.rootPath}} port: http {{ toYaml .Values.probes.livenessHttpGetConfig | indent 12 }} {{ toYaml .Values.probes.liveness | indent 10 }} readinessProbe: httpGet: - path: / + path: {{ .Values.rootPath}} port: http {{ toYaml .Values.probes.readinessHttpGetConfig | indent 12 }} {{ toYaml .Values.probes.readiness | indent 10 }} diff --git a/chart/stirling-pdf/values.yaml b/chart/stirling-pdf/values.yaml index e9e00c3e..3e3e560c 100644 --- a/chart/stirling-pdf/values.yaml +++ b/chart/stirling-pdf/values.yaml @@ -15,6 +15,9 @@ secret: commonLabels: {} # team_name: dev +# rootpath for the application +rootPath: / + envs: [] # - name: UI_APP_NAME # value: "Stirling PDF" @@ -24,8 +27,6 @@ envs: [] # value: "Stirling PDF" # - name: ALLOW_GOOGLE_VISIBILITY # value: "true" -# - name: APP_ROOT_PATH -# value: "/" # - name: APP_LOCALE # value: "en_GB"