From 1fa6c1262785ea03d9b60af187e7567fabf7fbcc Mon Sep 17 00:00:00 2001 From: Epicsteve2 Date: Tue, 5 Apr 2022 11:38:29 -0400 Subject: [PATCH] Allow customising liveness and readiness probes --- charts/trino/README.md | 4 +++ .../templates/deployment-coordinator.yaml | 12 ++++++++- charts/trino/templates/deployment-worker.yaml | 10 +++++++ charts/trino/values.yaml | 26 +++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) diff --git a/charts/trino/README.md b/charts/trino/README.md index 1d301601..f285a3e6 100644 --- a/charts/trino/README.md +++ b/charts/trino/README.md @@ -62,11 +62,15 @@ The following table lists the configurable parameters of the Trino chart and the | `coordinator.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` | | `coordinator.additionalJVMConfig` | | `{}` | | `coordinator.resources` | | `{}` | +| `coordinator.livenessProbe` | | `{}` | +| `coordinator.readinessProbe` | | `{}` | | `worker.jvm.maxHeapSize` | | `"8G"` | | `worker.jvm.gcMethod.type` | | `"UseG1GC"` | | `worker.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` | | `worker.additionalJVMConfig` | | `{}` | | `worker.resources` | | `{}` | +| `worker.livenessProbe` | | `{}` | +| `worker.readinessProbe` | | `{}` | diff --git a/charts/trino/templates/deployment-coordinator.yaml b/charts/trino/templates/deployment-coordinator.yaml index 3ffef9ad..d502e511 100644 --- a/charts/trino/templates/deployment-coordinator.yaml +++ b/charts/trino/templates/deployment-coordinator.yaml @@ -77,7 +77,7 @@ spec: {{- if eq .Values.server.config.authenticationType "PASSWORD" }} - mountPath: {{ .Values.server.config.path }}/auth name: password-volume - {{- end }} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -86,10 +86,20 @@ spec: httpGet: path: /v1/info port: http + initialDelaySeconds: {{ .Values.coordinator.livenessProbe.initialDelaySeconds | default 20 }} + periodSeconds: {{ .Values.coordinator.livenessProbe.periodSeconds | default 10 }} + timeoutSeconds: {{ .Values.coordinator.livenessProbe.timeoutSeconds | default 5 }} + failureThreshold: {{ .Values.coordinator.livenessProbe.failureThreshold | default 6 }} + successThreshold: {{ .Values.coordinator.livenessProbe.successThreshold | default 1 }} readinessProbe: httpGet: path: /v1/info port: http + initialDelaySeconds: {{ .Values.coordinator.readinessProbe.initialDelaySeconds | default 20 }} + periodSeconds: {{ .Values.coordinator.readinessProbe.periodSeconds | default 10 }} + timeoutSeconds: {{ .Values.coordinator.readinessProbe.timeoutSeconds | default 5 }} + failureThreshold: {{ .Values.coordinator.readinessProbe.failureThreshold | default 6 }} + successThreshold: {{ .Values.coordinator.readinessProbe.successThreshold | default 1 }} resources: {{- toYaml .Values.coordinator.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/trino/templates/deployment-worker.yaml b/charts/trino/templates/deployment-worker.yaml index a07464ca..4311306a 100644 --- a/charts/trino/templates/deployment-worker.yaml +++ b/charts/trino/templates/deployment-worker.yaml @@ -56,10 +56,20 @@ spec: httpGet: path: /v1/info port: http + initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds | default 20 }} + periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds | default 10 }} + timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds | default 5 }} + failureThreshold: {{ .Values.worker.livenessProbe.failureThreshold | default 6 }} + successThreshold: {{ .Values.worker.livenessProbe.successThreshold | default 1 }} readinessProbe: httpGet: path: /v1/info port: http + initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds | default 20 }} + periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds | default 10 }} + timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds | default 5 }} + failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold | default 6 }} + successThreshold: {{ .Values.worker.readinessProbe.successThreshold | default 1 }} resources: {{- toYaml .Values.worker.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/trino/values.yaml b/charts/trino/values.yaml index 56479a3e..0f293c15 100644 --- a/charts/trino/values.yaml +++ b/charts/trino/values.yaml @@ -176,6 +176,19 @@ coordinator: # cpu: 100m # memory: 128Mi + livenessProbe: {} + # initialDelaySeconds: 20 + # periodSeconds: 10 + # timeoutSeconds: 5 + # failureThreshold: 6 + # successThreshold: 1 + readinessProbe: {} + # initialDelaySeconds: 20 + # periodSeconds: 10 + # timeoutSeconds: 5 + # failureThreshold: 6 + # successThreshold: 1 + worker: jvm: maxHeapSize: "8G" @@ -197,3 +210,16 @@ worker: # requests: # cpu: 100m # memory: 128Mi + + livenessProbe: {} + # initialDelaySeconds: 20 + # periodSeconds: 10 + # timeoutSeconds: 5 + # failureThreshold: 6 + # successThreshold: 1 + readinessProbe: {} + # initialDelaySeconds: 20 + # periodSeconds: 10 + # timeoutSeconds: 5 + # failureThreshold: 6 + # successThreshold: 1