From f0f879f560278b05ab18dce092364fa6cf934364 Mon Sep 17 00:00:00 2001 From: Ievgenii Shepeliuk Date: Wed, 28 Apr 2021 20:39:39 +0300 Subject: [PATCH] fix: support custom http context Resolves #34 --- templates/_utils.tpl | 10 ++++++++++ templates/deployment.yaml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/_utils.tpl b/templates/_utils.tpl index 6f2cbf4..91ce745 100644 --- a/templates/_utils.tpl +++ b/templates/_utils.tpl @@ -31,3 +31,13 @@ ssl.keystore.password={{ .keystore.password }} {{- end -}} {{- end -}} {{- end -}} + +{{- define "cmak.healthUi" -}} +{{ $httpCtx := "" }} +{{- range .Values.ui.extraArgs -}} +{{- if hasPrefix "-Dplay.http.context=" . -}} +{{- $httpCtx = trimPrefix "-Dplay.http.context=" . -}} +{{- end -}} +{{- end -}} +{{ $httpCtx }}/api/health +{{- end -}} diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 96ea420..aaaacb2 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -75,7 +75,7 @@ spec: {{- end }} readinessProbe: httpGet: - path: /api/health + path: {{ include "cmak.healthUi" . }} port: http failureThreshold: 7 initialDelaySeconds: 15 @@ -83,7 +83,7 @@ spec: periodSeconds: 15 livenessProbe: httpGet: - path: /api/health + path: {{ include "cmak.healthUi" . }} port: http failureThreshold: 7 initialDelaySeconds: 45