From 32b1cad342972614e554d079b5b731833e885574 Mon Sep 17 00:00:00 2001 From: Giovanni Barbaro Date: Mon, 28 Oct 2024 13:20:12 +0100 Subject: [PATCH 1/2] Adds customization for liveness and readiness probes --- .../templates/deployment-gw-repset.yaml | 8 ++++++ components/tyk-gateway/values.yaml | 27 +++++++++++++++++++ tyk-control-plane/values.yaml | 27 +++++++++++++++++++ tyk-data-plane/values.yaml | 27 +++++++++++++++++++ tyk-oss/values.yaml | 27 +++++++++++++++++++ tyk-stack/values.yaml | 27 +++++++++++++++++++ 6 files changed, 143 insertions(+) diff --git a/components/tyk-gateway/templates/deployment-gw-repset.yaml b/components/tyk-gateway/templates/deployment-gw-repset.yaml index f089c278..c5abf375 100644 --- a/components/tyk-gateway/templates/deployment-gw-repset.yaml +++ b/components/tyk-gateway/templates/deployment-gw-repset.yaml @@ -421,6 +421,9 @@ spec: {{- include "tyk-gateway.tplvalues.render" (dict "value" .Values.gateway.extraVolumeMounts "context" $) | nindent 10 }} {{- end }} livenessProbe: + {{- if .Values.gateway.livenessProbe }} + {{- toYaml .Values.gateway.livenessProbe | nindent 10}} + {{- else }} httpGet: scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}" path: /hello @@ -433,7 +436,11 @@ spec: periodSeconds: 2 timeoutSeconds: 3 failureThreshold: 2 + {{- end }} readinessProbe: + {{- if .Values.gateway.readinessProbe }} + {{- toYaml .Values.gateway.readinessProbe | nindent 10}} + {{- else }} httpGet: scheme: "HTTP{{ if .Values.global.tls.gateway }}S{{ end }}" path: /hello @@ -446,6 +453,7 @@ spec: periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3 + {{- end }} {{- with .Values.gateway.extraContainers }} {{- include "tyk-gateway.tplvalues.render" (dict "value" . "context" $) | nindent 6 }} {{- end }} diff --git a/components/tyk-gateway/values.yaml b/components/tyk-gateway/values.yaml index 90f9daba..85b3da82 100644 --- a/components/tyk-gateway/values.yaml +++ b/components/tyk-gateway/values.yaml @@ -389,6 +389,33 @@ gateway: # memory: 128Mi resources: {} + # livenessProbe values for gateway pod. All fields from PodLivenessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # livenessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 5 + # periodSeconds: 2 + # timeoutSeconds: 3 + # failureThreshold: 2 + # successThreshold: 2 + livenessProbe: {} + + # readinessProbe values for gateway pod. All fields from PodReadinessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # readinessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 1 + # periodSeconds: 10 + # timeoutSeconds: 3 + # failureThreshold: 3 + readinessProbe: {} + # securityContext values for gateway pod. All fields from PodSecurityContext object can be added here. securityContext: runAsUser: 1000 diff --git a/tyk-control-plane/values.yaml b/tyk-control-plane/values.yaml index b2257409..56a0fb9b 100644 --- a/tyk-control-plane/values.yaml +++ b/tyk-control-plane/values.yaml @@ -429,6 +429,33 @@ tyk-gateway: # memory: 128Mi resources: {} + # livenessProbe values for gateway pod. All fields from PodLivenessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # livenessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 5 + # periodSeconds: 2 + # timeoutSeconds: 3 + # failureThreshold: 2 + # successThreshold: 2 + livenessProbe: {} + + # readinessProbe values for gateway pod. All fields from PodReadinessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # readinessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 1 + # periodSeconds: 10 + # timeoutSeconds: 3 + # failureThreshold: 3 + readinessProbe: {} + # securityContext values for gateway pod. All fields from PodSecurityContext object can be added here. securityContext: runAsUser: 1000 diff --git a/tyk-data-plane/values.yaml b/tyk-data-plane/values.yaml index 4de93010..65fef254 100644 --- a/tyk-data-plane/values.yaml +++ b/tyk-data-plane/values.yaml @@ -372,6 +372,33 @@ tyk-gateway: # memory: 128Mi resources: {} + # livenessProbe values for gateway pod. All fields from PodLivenessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # livenessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 5 + # periodSeconds: 2 + # timeoutSeconds: 3 + # failureThreshold: 2 + # successThreshold: 2 + livenessProbe: {} + + # readinessProbe values for gateway pod. All fields from PodReadinessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # readinessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 1 + # periodSeconds: 10 + # timeoutSeconds: 3 + # failureThreshold: 3 + readinessProbe: {} + # securityContext values for gateway pod. All fields from PodSecurityContext object can be added here. securityContext: runAsUser: 1000 diff --git a/tyk-oss/values.yaml b/tyk-oss/values.yaml index 934399b2..565b11ce 100644 --- a/tyk-oss/values.yaml +++ b/tyk-oss/values.yaml @@ -354,6 +354,33 @@ tyk-gateway: # memory: 128Mi resources: {} + # livenessProbe values for gateway pod. All fields from PodLivenessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # livenessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 5 + # periodSeconds: 2 + # timeoutSeconds: 3 + # failureThreshold: 2 + # successThreshold: 2 + livenessProbe: {} + + # readinessProbe values for gateway pod. All fields from PodReadinessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # readinessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 1 + # periodSeconds: 10 + # timeoutSeconds: 3 + # failureThreshold: 3 + readinessProbe: {} + # securityContext values for gateway pod. All fields from PodSecurityContext object can be added here. securityContext: runAsUser: 1000 diff --git a/tyk-stack/values.yaml b/tyk-stack/values.yaml index fc9beeb6..eb867f01 100644 --- a/tyk-stack/values.yaml +++ b/tyk-stack/values.yaml @@ -445,6 +445,33 @@ tyk-gateway: # memory: 128Mi resources: {} + # livenessProbe values for gateway pod. All fields from PodLivenessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # livenessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 5 + # periodSeconds: 2 + # timeoutSeconds: 3 + # failureThreshold: 2 + # successThreshold: 2 + livenessProbe: {} + + # readinessProbe values for gateway pod. All fields from PodReadinessProbe object can be added here. + # If set to empty or nil, the default health check on /health will be performed. + # readinessProbe: + # httpGet: + # scheme: http + # path: /hello + # port: 8080 + # initialDelaySeconds: 1 + # periodSeconds: 10 + # timeoutSeconds: 3 + # failureThreshold: 3 + readinessProbe: {} + # securityContext values for gateway pod. All fields from PodSecurityContext object can be added here. securityContext: runAsUser: 1000 From 962cb35da2ff0b019cc104883b2e07dbd0a40179 Mon Sep 17 00:00:00 2001 From: Giovanni Barbaro Date: Thu, 31 Oct 2024 09:12:44 +0100 Subject: [PATCH 2/2] Capitalizes http scheme in health probes --- components/tyk-gateway/values.yaml | 4 ++-- tyk-control-plane/values.yaml | 4 ++-- tyk-data-plane/values.yaml | 4 ++-- tyk-oss/values.yaml | 4 ++-- tyk-stack/values.yaml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/components/tyk-gateway/values.yaml b/components/tyk-gateway/values.yaml index 85b3da82..ad85b351 100644 --- a/components/tyk-gateway/values.yaml +++ b/components/tyk-gateway/values.yaml @@ -393,7 +393,7 @@ gateway: # If set to empty or nil, the default health check on /health will be performed. # livenessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 5 @@ -407,7 +407,7 @@ gateway: # If set to empty or nil, the default health check on /health will be performed. # readinessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 1 diff --git a/tyk-control-plane/values.yaml b/tyk-control-plane/values.yaml index 56a0fb9b..e43b504b 100644 --- a/tyk-control-plane/values.yaml +++ b/tyk-control-plane/values.yaml @@ -433,7 +433,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # livenessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 5 @@ -447,7 +447,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # readinessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 1 diff --git a/tyk-data-plane/values.yaml b/tyk-data-plane/values.yaml index 65fef254..f0d99080 100644 --- a/tyk-data-plane/values.yaml +++ b/tyk-data-plane/values.yaml @@ -376,7 +376,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # livenessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 5 @@ -390,7 +390,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # readinessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 1 diff --git a/tyk-oss/values.yaml b/tyk-oss/values.yaml index 565b11ce..c03a2ee5 100644 --- a/tyk-oss/values.yaml +++ b/tyk-oss/values.yaml @@ -358,7 +358,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # livenessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 5 @@ -372,7 +372,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # readinessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 1 diff --git a/tyk-stack/values.yaml b/tyk-stack/values.yaml index eb867f01..5377b037 100644 --- a/tyk-stack/values.yaml +++ b/tyk-stack/values.yaml @@ -449,7 +449,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # livenessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 5 @@ -463,7 +463,7 @@ tyk-gateway: # If set to empty or nil, the default health check on /health will be performed. # readinessProbe: # httpGet: - # scheme: http + # scheme: HTTP # path: /hello # port: 8080 # initialDelaySeconds: 1