From 330136aa141506f3718c3607ad250de7cdc405d1 Mon Sep 17 00:00:00 2001 From: Liran BG Date: Sun, 30 Jun 2024 21:29:29 +0300 Subject: [PATCH] [MLRun] Tweak chart for fine-tuned deployment (#1029) --- stable/mlrun/Chart.yaml | 2 +- stable/mlrun/templates/api-service.yaml | 5 ++++- stable/mlrun/values.yaml | 14 +++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/stable/mlrun/Chart.yaml b/stable/mlrun/Chart.yaml index d018d0e14..57435985a 100644 --- a/stable/mlrun/Chart.yaml +++ b/stable/mlrun/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: mlrun -version: 0.9.24 +version: 0.9.25 appVersion: 1.6.2 description: Machine Learning automation and tracking sources: diff --git a/stable/mlrun/templates/api-service.yaml b/stable/mlrun/templates/api-service.yaml index aab60df07..2a4150c85 100644 --- a/stable/mlrun/templates/api-service.yaml +++ b/stable/mlrun/templates/api-service.yaml @@ -31,8 +31,11 @@ spec: port: {{ .Values.api.service.port }} protocol: TCP targetPort: http -{{ if (and (eq .Values.api.service.type "NodePort") (not (empty .Values.api.service.nodePort))) }} +{{- if (and (eq .Values.api.service.type "NodePort") (not (empty .Values.api.service.nodePort))) }} nodePort: {{.Values.api.service.nodePort}} {{ end }} selector: {{- include "mlrun.api.selectorLabels" . | nindent 4 }} + {{- with .Values.api.service.selectorLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} diff --git a/stable/mlrun/values.yaml b/stable/mlrun/values.yaml index d2d2f064c..a721d76ae 100644 --- a/stable/mlrun/values.yaml +++ b/stable/mlrun/values.yaml @@ -73,6 +73,10 @@ api: port: 8080 targetPort: 8080 + # Additional labels for the service as addition to the default api-pods label selectors + # Can be used to direct traffic to mlrun workers + selectorLabels: {} + ingress: enabled: false annotations: {} @@ -161,7 +165,7 @@ api: path: /api/healthz port: http initialDelaySeconds: 1000 - timeoutSeconds: 10 + timeoutSeconds: 60 periodSeconds: 15 failureThreshold: 4 @@ -254,7 +258,7 @@ api: httpGet: port: http initialDelaySeconds: 15 - timeoutSeconds: 10 + timeoutSeconds: 30 periodSeconds: 15 failureThreshold: 4 @@ -315,8 +319,8 @@ api: failureThreshold: 3 livenessProbe: - timeoutSeconds: 3 - periodSeconds: 10 + timeoutSeconds: 10 + periodSeconds: 30 failureThreshold: 3 db: @@ -396,7 +400,7 @@ db: exec: command: ["/bin/bash", "/etc/config/mysql/health_check.sh"] initialDelaySeconds: 30 - timeoutSeconds: 5 + timeoutSeconds: 15 periodSeconds: 10 failureThreshold: 3