From 9dba53c38426d34d8c1a0dac6fc41022b66fbc4e Mon Sep 17 00:00:00 2001 From: Daniel Reuter Date: Tue, 21 Nov 2023 11:30:59 +0100 Subject: [PATCH] feat: make probes configurable via helm-chart --- .../steadybit-extension-stackstate/Chart.yaml | 2 +- .../templates/deployment.yaml | 10 ++ .../__snapshot__/deployment_test.yaml.snap | 110 ++++++++++++++++++ .../values.yaml | 16 +++ 4 files changed, 137 insertions(+), 1 deletion(-) diff --git a/charts/steadybit-extension-stackstate/Chart.yaml b/charts/steadybit-extension-stackstate/Chart.yaml index 88991ed..fbc9e09 100644 --- a/charts/steadybit-extension-stackstate/Chart.yaml +++ b/charts/steadybit-extension-stackstate/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: steadybit-extension-stackstate description: Steadybit stackstate extension Helm chart for Kubernetes. -version: 1.0.16 +version: 1.0.17 appVersion: latest home: https://www.steadybit.com/ icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png diff --git a/charts/steadybit-extension-stackstate/templates/deployment.yaml b/charts/steadybit-extension-stackstate/templates/deployment.yaml index bd9d836..96f2bea 100644 --- a/charts/steadybit-extension-stackstate/templates/deployment.yaml +++ b/charts/steadybit-extension-stackstate/templates/deployment.yaml @@ -70,10 +70,20 @@ spec: volumeMounts: {{- include "extensionlib.deployment.volumeMounts" (list .) | nindent 12 }} livenessProbe: + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} + successThreshold: {{ .Values.probes.liveness.successThreshold }} + failureThreshold: {{ .Values.probes.liveness.failureThreshold }} httpGet: path: /health/liveness port: 8084 readinessProbe: + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + successThreshold: {{ .Values.probes.readiness.successThreshold }} + failureThreshold: {{ .Values.probes.readiness.failureThreshold }} httpGet: path: /health/readiness port: 8084 diff --git a/charts/steadybit-extension-stackstate/tests/__snapshot__/deployment_test.yaml.snap b/charts/steadybit-extension-stackstate/tests/__snapshot__/deployment_test.yaml.snap index 93d4021..d1da46d 100644 --- a/charts/steadybit-extension-stackstate/tests/__snapshot__/deployment_test.yaml.snap +++ b/charts/steadybit-extension-stackstate/tests/__snapshot__/deployment_test.yaml.snap @@ -41,14 +41,24 @@ manifest should match snapshot using podAnnotations and Labels: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -113,14 +123,24 @@ manifest should match snapshot with TLS: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -188,14 +208,24 @@ manifest should match snapshot with env vars: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -256,14 +286,24 @@ manifest should match snapshot with existing secret: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -331,14 +371,24 @@ manifest should match snapshot with extra env vars: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -401,14 +451,24 @@ manifest should match snapshot with extra labels: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -475,14 +535,24 @@ manifest should match snapshot with mutual TLS: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -563,14 +633,24 @@ manifest should match snapshot with mutual TLS using containerPaths: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -631,14 +711,24 @@ manifest should match snapshot with podSecurityContext: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -701,14 +791,24 @@ manifest should match snapshot with priority class: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m @@ -770,14 +870,24 @@ manifest should match snapshot without TLS: image: ghcr.io/steadybit/extension-stackstate:latest imagePullPolicy: Always livenessProbe: + failureThreshold: 5 httpGet: path: /health/liveness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 name: extension readinessProbe: + failureThreshold: 3 httpGet: path: /health/readiness port: 8084 + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 resources: limits: cpu: 200m diff --git a/charts/steadybit-extension-stackstate/values.yaml b/charts/steadybit-extension-stackstate/values.yaml index 6d3c0f0..c691367 100644 --- a/charts/steadybit-extension-stackstate/values.yaml +++ b/charts/steadybit-extension-stackstate/values.yaml @@ -44,6 +44,22 @@ logging: # logging.format -- The format of the log entries. One of text, json format: text +probes: + # probes.readiness.* -- Configuration of the Kubernetes readiness probe + readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + successThreshold: 1 + # probes.liveness.* -- Configuration of the Kubernetes liveness probe + liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 5 + successThreshold: 1 + resources: requests: # resources.requests.memory -- The minimal amount of memory needed