From 2f8dc75aa8e529ece41348ef1a3676fb03720280 Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Fri, 5 Dec 2025 13:30:08 +0200 Subject: [PATCH] Update my-recipes front image svc --- .../templates/backend-deployment.yaml | 20 +++++++++++++++---- .../templates/frontend-deployment.yaml | 7 +++++++ charts/my-recipes-chart/values.yaml | 4 ++++ manifests/my-recipes/values.yaml | 2 ++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/charts/my-recipes-chart/templates/backend-deployment.yaml b/charts/my-recipes-chart/templates/backend-deployment.yaml index 3fc4485..78e204d 100644 --- a/charts/my-recipes-chart/templates/backend-deployment.yaml +++ b/charts/my-recipes-chart/templates/backend-deployment.yaml @@ -26,16 +26,28 @@ spec: name: http protocol: TCP env: - - name: PYTHONUNBUFFERED - value: "1" + {{- if .Values.backend.env }} + {{- range $key, $value := .Values.backend.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} envFrom: - secretRef: name: {{ .Release.Name }}-db-credentials + startupProbe: + httpGet: + path: /docs + port: http + initialDelaySeconds: 15 + periodSeconds: 5 + timeoutSeconds: 3 + failureThreshold: 30 livenessProbe: httpGet: path: /docs port: http - initialDelaySeconds: 10 + initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 @@ -43,7 +55,7 @@ spec: httpGet: path: /docs port: http - initialDelaySeconds: 5 + initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 2 diff --git a/charts/my-recipes-chart/templates/frontend-deployment.yaml b/charts/my-recipes-chart/templates/frontend-deployment.yaml index 1555238..8973e53 100644 --- a/charts/my-recipes-chart/templates/frontend-deployment.yaml +++ b/charts/my-recipes-chart/templates/frontend-deployment.yaml @@ -25,6 +25,13 @@ spec: - containerPort: {{ .Values.frontend.service.targetPort }} name: http protocol: TCP + {{- with .Values.frontend.env }} + env: + {{- range $key, $value := . }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} livenessProbe: httpGet: path: / diff --git a/charts/my-recipes-chart/values.yaml b/charts/my-recipes-chart/values.yaml index 7ba79b3..76ad8f8 100644 --- a/charts/my-recipes-chart/values.yaml +++ b/charts/my-recipes-chart/values.yaml @@ -41,6 +41,10 @@ frontend: port: 3000 targetPort: 3000 + env: {} + # Uncomment and set API_BASE if needed: + # API_BASE: "http://localhost:8000/api" + resources: requests: cpu: 50m diff --git a/manifests/my-recipes/values.yaml b/manifests/my-recipes/values.yaml index 0d911a1..563f147 100644 --- a/manifests/my-recipes/values.yaml +++ b/manifests/my-recipes/values.yaml @@ -36,6 +36,8 @@ frontend: type: ClusterIP port: 3000 targetPort: 3000 + env: + API_BASE: "https://my-recipes.dvirlabs.com/api" resources: requests: cpu: 50m