Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catered for liveness and readiness probe when ingress supplied #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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