Skip to content

Conversation

khetho
Copy link

@khetho khetho commented Dec 21, 2021

Currently when deploying into a Kubernetes cluster with own ingress configured which uses specific path prefix which is not rewritten the liveness and readiness probes fail. This is because the deployment does not take into consideration the path prefix in the liveness and readiness url's even when it should. It is always your deployment.yaml

      livenessProbe:
        httpGet:
          path: /
          port: http
      readinessProbe:
        httpGet:
          path: /
          port: http

This pull request updates this section to include the path when the ingress is configured (ingress.configured=true) and the path is not being rewritten in the ingress (ingress.rewritePath=false) as per my deployment.yaml

      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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant