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