From e9f9ec4d623dcb75318cf6fdb2df32ec0186f025 Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 30 Jun 2024 13:35:25 +0300 Subject: [PATCH 1/2] initial --- stable/mlrun/Chart.yaml | 2 +- stable/mlrun/templates/api-service.yaml | 1 + stable/mlrun/values.yaml | 14 +++++++++----- 3 files changed, 11 insertions(+), 6 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..abc6d0975 100644 --- a/stable/mlrun/templates/api-service.yaml +++ b/stable/mlrun/templates/api-service.yaml @@ -36,3 +36,4 @@ spec: {{ end }} selector: {{- include "mlrun.api.selectorLabels" . | nindent 4 }} + {{- include "mlrun.api.service.selectorLabels" . | nindent 4 }} 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 From c16e1a97baa12fd29ec72ce21e70608fcc161f1a Mon Sep 17 00:00:00 2001 From: liranbg Date: Sun, 30 Jun 2024 14:37:53 +0300 Subject: [PATCH 2/2] fix --- stable/mlrun/templates/api-service.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stable/mlrun/templates/api-service.yaml b/stable/mlrun/templates/api-service.yaml index abc6d0975..2a4150c85 100644 --- a/stable/mlrun/templates/api-service.yaml +++ b/stable/mlrun/templates/api-service.yaml @@ -31,9 +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 }} - {{- include "mlrun.api.service.selectorLabels" . | nindent 4 }} + {{- with .Values.api.service.selectorLabels }} + {{- toYaml . | nindent 4 }} + {{- end }}