From 87d029991e4b6ed7016535cb27ab0969626fa0a3 Mon Sep 17 00:00:00 2001 From: Annavar Satish <112172196+Annavar-satish@users.noreply.github.com> Date: Mon, 15 May 2023 10:34:51 +0530 Subject: [PATCH] feat/healthcheck update added type tcpSocket (#32) * feat/healthcheck update added type tcpSocket * Update service.yaml Signed-off-by: Rakshit Menpara <205111+deltasquare4@users.noreply.github.com> * moved 'initialDelaySeconds' and 'periodSeconds' to values file --------- Signed-off-by: Rakshit Menpara <205111+deltasquare4@users.noreply.github.com> Co-authored-by: Rakshit Menpara <205111+deltasquare4@users.noreply.github.com> --- charts/polymorphic-app/Chart.yaml | 2 +- charts/polymorphic-app/templates/service.yaml | 20 +++++++++++++++++-- charts/polymorphic-app/values.yaml | 3 +++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/charts/polymorphic-app/Chart.yaml b/charts/polymorphic-app/Chart.yaml index cf6e350..efbc3cd 100644 --- a/charts/polymorphic-app/Chart.yaml +++ b/charts/polymorphic-app/Chart.yaml @@ -4,5 +4,5 @@ description: A Helm chart for deploying any custom applications, specifically po maintainers: - name: improwised type: application -version: 1.0.2 +version: 1.0.3 appVersion: 1.0.0 diff --git a/charts/polymorphic-app/templates/service.yaml b/charts/polymorphic-app/templates/service.yaml index 61e1616..c4c155e 100644 --- a/charts/polymorphic-app/templates/service.yaml +++ b/charts/polymorphic-app/templates/service.yaml @@ -109,13 +109,29 @@ spec: livenessProbe: httpGet: path: {{ .healthcheck.path | default $.Values.serviceTemplate.healthcheck.path }} - port: http + port: {{ .healthcheck.port | default $.Values.serviceTemplate.healthcheck.port }} timeoutSeconds: 7 + initialDelaySeconds: {{ .healthcheck.initialDelaySeconds | default $.Values.serviceTemplate.healthcheck.initialDelaySeconds | default "20" }} + periodSeconds: {{ .healthcheck.periodSeconds | default $.Values.serviceTemplate.healthcheck.periodSeconds | default "20" }} readinessProbe: httpGet: path: {{ .healthcheck.path | default $.Values.serviceTemplate.healthcheck.path }} - port: http + port: {{ .healthcheck.port | default $.Values.serviceTemplate.healthcheck.port }} timeoutSeconds: 7 + initialDelaySeconds: {{ .healthcheck.initialDelaySeconds | default $.Values.serviceTemplate.healthcheck.initialDelaySeconds | default "20" }} + periodSeconds: {{ .healthcheck.periodSeconds | default $.Values.serviceTemplate.healthcheck.periodSeconds | default "20" }} + {{- end }} + {{- if and (or (eq .healthcheck.type "tcpSocket") (eq $.Values.serviceTemplate.healthcheck.type "tcpSocket")) (or .healthcheck.port $.Values.serviceTemplate.healthcheck.port) }} + livenessProbe: + tcpSocket: + port: {{ .healthcheck.port | default $.Values.serviceTemplate.healthcheck.port }} + initialDelaySeconds: {{ .healthcheck.initialDelaySeconds | default $.Values.serviceTemplate.healthcheck.initialDelaySeconds | default "20" }} + periodSeconds: {{ .healthcheck.periodSeconds | default $.Values.serviceTemplate.healthcheck.periodSeconds | default "20" }} + readinessProbe: + tcpSocket: + port: {{ .healthcheck.port | default $.Values.serviceTemplate.healthcheck.port }} + initialDelaySeconds: {{ .healthcheck.initialDelaySeconds | default $.Values.serviceTemplate.healthcheck.initialDelaySeconds | default "20" }} + periodSeconds: {{ .healthcheck.periodSeconds | default $.Values.serviceTemplate.healthcheck.periodSeconds | default "20" }} {{- end }} {{- end }} diff --git a/charts/polymorphic-app/values.yaml b/charts/polymorphic-app/values.yaml index dbbf1b5..4e7635b 100644 --- a/charts/polymorphic-app/values.yaml +++ b/charts/polymorphic-app/values.yaml @@ -28,6 +28,9 @@ serviceTemplate: enabled: false type: httpGet path: /healthz + port: http + # initialDelaySeconds: 30 + # periodSeconds: 30 autoscaling: false minReplicaCount: 1