From 93b2ec2a8b47ab176849677a71541776fd954d8b Mon Sep 17 00:00:00 2001 From: RafaelOAiSquared <106079170+RafaelOAiSquared@users.noreply.github.com> Date: Thu, 2 May 2024 10:00:16 -0400 Subject: [PATCH] feat: readiness/liveliness probe for multiwoven-worker (#10) * feat: readiness probe for multiwoven-worker * feat: added liveliness probe to worker * chore: using healthPort variable instead of hardcoded port --- charts/multiwoven/Chart.yaml | 4 ++-- .../templates/multiwoven-worker-deployment.yaml | 17 ++++++++++++++++- charts/multiwoven/values.yaml | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/charts/multiwoven/Chart.yaml b/charts/multiwoven/Chart.yaml index 8f61506..4b4474d 100644 --- a/charts/multiwoven/Chart.yaml +++ b/charts/multiwoven/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: multiwoven description: Open-source reverse ETL, an alternative to Hightouch, Census etc. 🔥 type: application -version: 0.4.0 -appVersion: "0.4.0" +version: 0.5.0 +appVersion: "0.5.0" maintainers: - name: subintp - name: RafaelOAiSquared diff --git a/charts/multiwoven/templates/multiwoven-worker-deployment.yaml b/charts/multiwoven/templates/multiwoven-worker-deployment.yaml index 790458c..cedd9e6 100644 --- a/charts/multiwoven/templates/multiwoven-worker-deployment.yaml +++ b/charts/multiwoven/templates/multiwoven-worker-deployment.yaml @@ -3,7 +3,6 @@ kind: Deployment metadata: name: {{ include "chart.fullname" . }}-worker namespace: {{ .Values.kubernetesNamespace }} - labels: app: {{ include "chart.fullname" . }}-worker io.kompose.service: {{ include "chart.fullname" . }}-worker @@ -27,10 +26,26 @@ spec: env: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ quote .Values.kubernetesClusterDomain }} + - name: MULTIWOVEN_WORKER_HEALTH_CHECK_PORT + value: {{ quote .Values.multiwovenWorker.healthPort }} envFrom: - configMapRef: name: {{ include "chart.fullname" . }}-config image: {{ .Values.multiwovenWorker.multiwovenWorker.image.repository }}:{{ .Values.multiwovenWorker.multiwovenWorker.image.tag | default .Chart.AppVersion }} + livenessProbe: + httpGet: + path: /health + port: {{ .Values.multiwovenWorker.healthPort }} + initialDelaySeconds: 15 + periodSeconds: 10 name: {{ include "chart.fullname" . }}-worker + ports: + - containerPort: {{ .Values.multiwovenWorker.healthPort }} + readinessProbe: + httpGet: + path: /health + port: {{ .Values.multiwovenWorker.healthPort }} + initialDelaySeconds: 5 + periodSeconds: 10 resources: {{- toYaml .Values.multiwovenWorker.multiwovenWorker.resources | nindent 10 }} restartPolicy: Always \ No newline at end of file diff --git a/charts/multiwoven/values.yaml b/charts/multiwoven/values.yaml index 58b5143..152f2a3 100644 --- a/charts/multiwoven/values.yaml +++ b/charts/multiwoven/values.yaml @@ -95,6 +95,7 @@ multiwovenUI: replicas: 1 type: ClusterIP multiwovenWorker: + healthPort: 4567 multiwovenWorker: args: - sh