From ef07d1a0252e22796dfc981407048b4f7654bba0 Mon Sep 17 00:00:00 2001 From: Stanley Zhang Date: Mon, 21 Oct 2024 02:34:14 +1300 Subject: [PATCH] feat: Make startupProbe, livenessProbe and readinessProbe configurable for Executor and API (#151) * feat: Make initialDelaySeconds configurable for Executor * update the default value to the previous value * also make the initialDelaySeconds for API configurable * correct typo and also parameterise other options --- charts/terrakube/Chart.yaml | 2 +- charts/terrakube/templates/deployment-api.yaml | 12 ++++++------ .../templates/deployment-executor.yaml | 12 ++++++------ charts/terrakube/values.yaml | 18 ++++++++++++++++++ 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/charts/terrakube/Chart.yaml b/charts/terrakube/Chart.yaml index 0bb26a1..17faa3d 100644 --- a/charts/terrakube/Chart.yaml +++ b/charts/terrakube/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 3.23.0 +version: 3.23.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/terrakube/templates/deployment-api.yaml b/charts/terrakube/templates/deployment-api.yaml index a262994..c622cff 100644 --- a/charts/terrakube/templates/deployment-api.yaml +++ b/charts/terrakube/templates/deployment-api.yaml @@ -56,20 +56,20 @@ spec: httpGet: path: /actuator/health port: 8080 - failureThreshold: 30 - periodSeconds: 10 + failureThreshold: {{ .Values.api.startupProbe.failureThreshold }} + periodSeconds: {{ .Values.api.startupProbe.periodSeconds }} livenessProbe: httpGet: path: /actuator/health/liveness port: 8080 - initialDelaySeconds: 10 - periodSeconds: 10 + initialDelaySeconds: {{ .Values.api.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.api.livenessProbe.periodSeconds }} readinessProbe: httpGet: path: /actuator/health/readiness port: 8080 - initialDelaySeconds: 120 - periodSeconds: 10 + initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }} {{- with .Values.api.containerSecurityContext }} securityContext: {{- toYaml . | nindent 10 }} diff --git a/charts/terrakube/templates/deployment-executor.yaml b/charts/terrakube/templates/deployment-executor.yaml index 8b220f7..5f7c0be 100644 --- a/charts/terrakube/templates/deployment-executor.yaml +++ b/charts/terrakube/templates/deployment-executor.yaml @@ -56,20 +56,20 @@ spec: httpGet: path: /actuator/health port: 8090 - failureThreshold: 30 - periodSeconds: 10 + failureThreshold: {{ .Values.executor.startupProbe.failureThreshold }} + periodSeconds: {{ .Values.executor.startupProbe.periodSeconds }} livenessProbe: httpGet: path: /actuator/health/liveness port: 8090 - initialDelaySeconds: 10 - periodSeconds: 10 + initialDelaySeconds: {{ .Values.executor.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.executor.livenessProbe.periodSeconds }} readinessProbe: httpGet: path: /actuator/health/readiness port: 8090 - initialDelaySeconds: 120 - periodSeconds: 10 + initialDelaySeconds: {{ .Values.executor.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.executor.readinessProbe.periodSeconds }} {{- with .Values.executor.containerSecurityContext }} securityContext: {{- toYaml . | nindent 10 }} diff --git a/charts/terrakube/values.yaml b/charts/terrakube/values.yaml index dd5b4da..7dab093 100644 --- a/charts/terrakube/values.yaml +++ b/charts/terrakube/values.yaml @@ -196,6 +196,15 @@ api: containerSecurityContext: {} imagePullSecrets: [] initContainers: [] + startupProbe: + failureThreshold: 30 + periodSeconds: 10 + readinessProbe: + initialDelaySeconds: 120 + periodSeconds: 10 + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 cache: moduleCacheMaxTotal: "128" moduleCacheMaxIdle: "128" @@ -243,6 +252,15 @@ executor: containerSecurityContext: {} imagePullSecrets: [] initContainers: [] + startupProbe: + failureThreshold: 30 + periodSeconds: 10 + readinessProbe: + initialDelaySeconds: 120 + periodSeconds: 10 + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 10 ## Registry properties registry: