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

[HELM]: Added additional probes options and startup probe. #13165

Merged
merged 5 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions helm/pinot/templates/broker/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,33 @@ spec:
{{- end }}
{{- if .Values.broker.probes.livenessEnabled }}
livenessProbe:
abhioncbr marked this conversation as resolved.
Show resolved Hide resolved
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.broker.probes.liveness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.broker.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.broker.probes.liveness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.broker.probes.liveness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.broker.probes.liveness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.broker.probes.endpoint }}
port: {{ .Values.broker.service.port }}
{{- end }}
{{- if .Values.broker.probes.readinessEnabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.broker.probes.readiness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.broker.probes.readiness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.broker.probes.readiness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.broker.probes.readiness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.broker.probes.readiness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.broker.probes.endpoint }}
port: {{ .Values.broker.service.port }}
{{- end }}
{{- if .Values.broker.probes.startupEnabled }}
startupProbe:
initialDelaySeconds: {{ .Values.broker.probes.startup.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.broker.probes.startup.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.broker.probes.startup.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold:{{ .Values.broker.probes.startup.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.broker.probes.startup.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.broker.probes.endpoint }}
port: {{ .Values.broker.service.port }}
Expand Down
25 changes: 21 additions & 4 deletions helm/pinot/templates/controller/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,33 @@ spec:
{{- end }}
{{- if .Values.controller.probes.livenessEnabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.controller.probes.liveness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds:{{ .Values.controller.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.controller.probes.liveness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.controller.probes.liveness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.controller.probes.liveness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.controller.probes.endpoint }}
port: {{ .Values.controller.service.port }}
{{- end }}
{{- if .Values.controller.probes.readinessEnabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.controller.probes.readiness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.probes.readiness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.controller.probes.readiness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.controller.probes.readiness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.controller.probes.readiness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.controller.probes.endpoint }}
port: {{ .Values.controller.service.port }}
{{- end }}
{{- if .Values.controller.probes.startupEnabled }}
startupProbe:
initialDelaySeconds: {{ .Values.controller.probes.startup.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.probes.startup.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.controller.probes.startup.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.controller.probes.startup.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.controller.probes.startup.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.controller.probes.endpoint }}
port: {{ .Values.controller.service.port }}
Expand Down
25 changes: 21 additions & 4 deletions helm/pinot/templates/minion-stateless/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,37 @@ spec:
{{- end }}
{{- if .Values.minionStateless.probes.livenessEnabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.minionStateless.probes.liveness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minionStateless.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minionStateless.probes.liveness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minionStateless.probes.liveness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minionStateless.probes.liveness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minionStateless.probes.endpoint }}
port: {{ .Values.minionStateless.service.port }}
{{- end }}
{{- if .Values.minionStateless.probes.readinessEnabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.minionStateless.probes.readiness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minionStateless.probes.readiness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minionStateless.probes.readiness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minionStateless.probes.readiness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minionStateless.probes.readiness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minionStateless.probes.endpoint }}
port: {{ .Values.minionStateless.service.port }}
{{- end }}
{{- if .Values.minionStateless.probes.startupEnabled }}
startupProbe:
initialDelaySeconds: {{ .Values.minionStateless.probes.startup.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minionStateless.probes.startup.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minionStateless.probes.startup.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minionStateless.probes.startup.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minionStateless.probes.startup.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minionStateless.probes.endpoint }}
port: {{ .Values.minionStateless.service.port }}
{{- end }}
volumeMounts:
- name: config
mountPath: /var/pinot/minion/config
Expand Down
25 changes: 21 additions & 4 deletions helm/pinot/templates/minion/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,33 @@ spec:
{{- end }}
{{- if .Values.minion.probes.livenessEnabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.minion.probes.liveness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minion.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minion.probes.liveness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minion.probes.liveness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minion.probes.liveness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minion.probes.endpoint }}
port: {{ .Values.minion.service.port }}
{{- end }}
{{- if .Values.minion.probes.readinessEnabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.minion.probes.readiness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minion.probes.readiness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minion.probes.readiness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minion.probes.readiness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minion.probes.readiness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minion.probes.endpoint }}
port: {{ .Values.minion.service.port }}
{{- end }}
{{- if .Values.minion.probes.startupEnabled }}
startupProbe:
initialDelaySeconds: {{ .Values.minion.probes.startup.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.minion.probes.startup.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.minion.probes.startup.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.minion.probes.startup.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.minion.probes.startup.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
path: {{ .Values.minion.probes.endpoint }}
port: {{ .Values.minion.service.port }}
Expand Down
29 changes: 25 additions & 4 deletions helm/pinot/templates/server/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ spec:
{{- end }}
{{- if .Values.server.probes.livenessEnabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.server.probes.liveness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.server.probes.liveness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.server.probes.liveness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.server.probes.liveness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.server.probes.liveness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
{{- if and .Values.server.probes.livenessProbe .Values.server.probes.livenessProbe.endpoint}}
path: {{ .Values.server.probes.livenessProbe.endpoint }}
Expand All @@ -100,8 +103,11 @@ spec:
{{- end }}
{{- if .Values.server.probes.readinessEnabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.probes.periodSeconds }}
initialDelaySeconds: {{ .Values.server.probes.readiness.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.server.probes.readiness.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.server.probes.readiness.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.server.probes.readiness.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.server.probes.readiness.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
{{- if and .Values.server.probes.readinessProbe .Values.server.probes.readinessProbe.endpoint}}
path: {{ .Values.server.probes.readinessProbe.endpoint }}
Expand All @@ -110,6 +116,21 @@ spec:
{{- end }}
port: {{ .Values.server.service.adminPort }}
{{- end }}
{{- if .Values.server.probes.startupEnabled }}
startupProbe:
initialDelaySeconds: {{ .Values.server.probes.startup.initialDelaySeconds | default .Values.probes.initialDelaySeconds }}
periodSeconds: {{ .Values.server.probes.startup.periodSeconds | default .Values.probes.periodSeconds }}
failureThreshold: {{ .Values.server.probes.startup.failureThreshold | default .Values.probes.failureThreshold }}
successThreshold: {{ .Values.server.probes.startup.successThreshold | default .Values.probes.successThreshold }}
timeoutSeconds: {{ .Values.server.probes.startup.timeoutSeconds | default .Values.probes.timeoutSeconds }}
httpGet:
{{- if and .Values.server.probes.livenessProbe .Values.server.probes.livenessProbe.endpoint}}
path: {{ .Values.server.probes.livenessProbe.endpoint }}
{{- else }}
path: {{ .Values.server.probes.endpoint }}
{{- end }}
port: {{ .Values.server.service.adminPort }}
{{- end }}
volumeMounts:
- name: config
mountPath: /var/pinot/server/config
Expand Down
111 changes: 111 additions & 0 deletions helm/pinot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ securityContext: {}
# runAsNonRoot: true
# runAsUser: 1000

# default values of the probes i.e. liveness and readiness.
# customization of values is present at the component level.
probes:
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 10
# should be 1 for liveness and startup probe, as per K8s doc.
successThreshold: 1
timeoutSeconds: 10

serviceAccount:
# Specifies whether a service account should be created
Expand Down Expand Up @@ -92,6 +98,27 @@ controller:
endpoint: "/health"
livenessEnabled: false
readinessEnabled: false
startupEnabled: false
liveness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

readiness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

startup:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

persistence:
enabled: true
Expand Down Expand Up @@ -218,6 +245,27 @@ broker:
endpoint: "/health"
livenessEnabled: true
readinessEnabled: true
startupEnabled: false
liveness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

readiness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

startup:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

persistence:
extraVolumes: []
Expand Down Expand Up @@ -320,6 +368,27 @@ server:
endpoint: "/health"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with HELM, but we do have separate endpoint on server for liveness (/health/liveness) and readiness (/health/readiness) check. Should we update this file to accommodate that?

livenessEnabled: false
readinessEnabled: false
startupEnabled: false
liveness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

readiness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

startup:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

dataDir: /var/pinot/server/data/index
segmentTarDir: /var/pinot/server/data/segment
Expand Down Expand Up @@ -419,6 +488,27 @@ minion:
endpoint: "/health"
livenessEnabled: true
readinessEnabled: true
startupEnabled: false
liveness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

readiness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

startup:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

dataDir: /var/pinot/minion/data
jvmOpts: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-minion.log"
Expand Down Expand Up @@ -509,6 +599,27 @@ minionStateless:
endpoint: "/health"
livenessEnabled: true
readinessEnabled: true
startupEnabled: true
liveness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

readiness:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

startup:
initialDelaySeconds: 60
failureThreshold: 10
timeoutSeconds: 10
successThreshold: 1
periodSeconds: 10

dataDir: /var/pinot/minion/data
jvmOpts: "-XX:ActiveProcessorCount=2 -Xms256M -Xmx1G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xlog:gc*:file=/opt/pinot/gc-pinot-minion.log"
Expand Down
Loading