From 644f4b07069bc97d341e0fd380df299a9a508a6e Mon Sep 17 00:00:00 2001 From: Oleksandr Kononenko Date: Tue, 12 Nov 2024 17:42:16 +0200 Subject: [PATCH] [strongswan] Add health probes for service Related-Prod: PRODX-47901 Change-Id: I09d5a6840efeedd8500ce2abe1a8806c97321ac3 --- .../infra/strongswan/templates/daemonset.yaml | 8 ++++++++ charts/infra/strongswan/values.yaml | 17 ++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/charts/infra/strongswan/templates/daemonset.yaml b/charts/infra/strongswan/templates/daemonset.yaml index b0c749e6e..1da741776 100644 --- a/charts/infra/strongswan/templates/daemonset.yaml +++ b/charts/infra/strongswan/templates/daemonset.yaml @@ -12,6 +12,12 @@ See the License for the specific language governing permissions and limitations under the License. */}} +{{- define "healthProbe" }} +exec: + command: + - "true" +{{- end }} + {{- define "strongswan.daemonset" }} {{- $daemonset := index . 0 }} {{- $configMapName := index . 1 }} @@ -53,6 +59,8 @@ spec: - name: strongswan {{ tuple $envAll "strongswan" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} +{{ dict "envAll" . "component" "strongswan" "container" "strongswan" "type" "readiness" "probeTemplate" (include "healthProbe" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} +{{ dict "envAll" . "component" "strongswan" "container" "strongswan" "type" "liveness" "probeTemplate" (include "healthProbe" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }} securityContext: capabilities: add: diff --git a/charts/infra/strongswan/values.yaml b/charts/infra/strongswan/values.yaml index 2a95d3585..f76fcc101 100644 --- a/charts/infra/strongswan/values.yaml +++ b/charts/infra/strongswan/values.yaml @@ -92,7 +92,22 @@ pod: limits: memory: "1024Mi" cpu: "2000m" - + probes: + strongswan: + strongswan: + readiness: + enabled: true + params: + initialDelaySeconds: 5 + periodSeconds: 30 + timeoutSeconds: 5 + liveness: + enabled: true + params: + initialDelaySeconds: 5 + periodSeconds: 3600 + timeoutSeconds: 5 + failureThreshold: 3 conf: ipsec: config setup: