From 3642ecd0ca96379fee0451f97ca37a6a24cece7a Mon Sep 17 00:00:00 2001 From: Khetho Mtembo Date: Tue, 21 Dec 2021 13:21:34 +0200 Subject: [PATCH] Catered for liveness and readiness probe when ingress and path prefix supplied without path rewrite --- deploy/helm/hello-kubernetes/templates/deployment.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/helm/hello-kubernetes/templates/deployment.yaml b/deploy/helm/hello-kubernetes/templates/deployment.yaml index 5ac16b9a..6cf6365d 100644 --- a/deploy/helm/hello-kubernetes/templates/deployment.yaml +++ b/deploy/helm/hello-kubernetes/templates/deployment.yaml @@ -25,11 +25,19 @@ spec: protocol: TCP livenessProbe: httpGet: + {{- if and .Values.ingress.configured (not .Values.ingress.rewritePath) }} + path: "/{{ .Values.ingress.pathPrefix }}" + {{- else }} path: / + {{- end }} port: http readinessProbe: httpGet: + {{- if and .Values.ingress.configured (not .Values.ingress.rewritePath) }} + path: "/{{ .Values.ingress.pathPrefix }}" + {{- else }} path: / + {{- end }} port: http env: {{- if ne (.Values.deployment.container.port | int) (8080 | int) }}