-
Notifications
You must be signed in to change notification settings - Fork 169
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
Allow customising liveness and readiness probes #44
Conversation
@hashhar would it be possible to get someone to review this PR? |
I'll take a look this weekend. sorry about the delay. |
{{- if .Values.coordinator.livenessProbe.enabled }} | ||
livenessProbe: | ||
httpGet: | ||
path: /v1/info | ||
port: http | ||
initialDelaySeconds: {{ .Values.coordinator.livenessProbe.initialDelaySeconds }} | ||
periodSeconds: {{ .Values.coordinator.livenessProbe.periodSeconds }} | ||
timeoutSeconds: {{ .Values.coordinator.livenessProbe.timeoutSeconds }} | ||
successThreshold: {{ .Values.coordinator.livenessProbe.successThreshold }} | ||
failureThreshold: {{ .Values.coordinator.livenessProbe.failureThreshold }} | ||
{{- else if .Values.coordinator.customLivenessProbe }} | ||
{{- with .Values.coordinator.customLivenessProbe }} | ||
livenessProbe: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's split this by moving the default definition into helpers.tpl and leaving values.yaml empty and have the deployment pick the default if values is empty.
that way it keeps the chart simple by providing good defaults and allows anyone who wants customisation to provide their own livenessProbe
node.
Same for readinessProbe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the need for using _helpers.tpl
. Instead, why not use the helm default
function?
So it would look like:
initialDelaySeconds: {{ .Values.coordinator.readinessProbe.initialDelaySeconds | default 20 }}
periodSeconds: {{ .Values.coordinator.readinessProbe.periodSeconds | default 10 }}
timeoutSeconds: {{ .Values.coordinator.readinessProbe.timeoutSeconds | default 5 }}
successThreshold: {{ .Values.coordinator.readinessProbe.successThreshold | default 6 }}
failureThreshold: {{ .Values.coordinator.readinessProbe.failureThreshold | default 1 }}
If this is the case, do you also want values.yaml
to look like this?
livenessProbe: {}
# enabled: true
# initialDelaySeconds: 20
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
readinessProbe: {}
# enabled: true
# initialDelaySeconds: 20
# periodSeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
customLivenessProbe: {}
customReadinessProbe: {}
I feel like that would make customLivenessProbe
and livenessProbe
too similar. We could also only have customLivenessProbe
and remove livenessProbe
instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say we can remove customLivenessProbe
and just use one of them. Keeps things simpler (for consumers of the chart for sure, maybe not for authors which is fine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I've removed customReadinessProbe
, customLivenessProbe
, readinessProbe.enabled
, livenessProbe.enabled
as well
All of the if
statements are gone and it will use the defaults if the selected values don't exist.
LGTM and let's reword commit to |
Adds default
livenessProbe
andreadinessProbes
, along withcustomLivenessProbe
andcustomReadinessProbe
to the Trino chart for both the coordinator and workers.