Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/mlrun/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mlrun
version: 0.11.15
version: 0.11.16
appVersion: 1.10.1
description: Machine Learning automation and tracking
sources:
Expand Down
17 changes: 17 additions & 0 deletions stable/mlrun/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,20 @@ Resolve the MLRun DB DSN
{{- printf .Values.httpDB.dsn -}}
{{- end -}}
{{- end -}}

{{/*
Resolve the API persistence access mode
- If accessMode is explicitly set, use it
- Otherwise, infer from worker replicas:
- ReadWriteMany when worker replicas > 0 (multiple pods need shared volume)
- ReadWriteOnce when worker replicas == 0 (single pod)
*/}}
{{- define "mlrun.api.persistence.accessMode" -}}
{{- if .Values.api.persistence.accessMode -}}
{{- printf .Values.api.persistence.accessMode -}}
{{- else if gt (int .Values.api.worker.minReplicas) 0 -}}
{{- print "ReadWriteMany" -}}
{{- else -}}
{{- print "ReadWriteOnce" -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/mlrun/templates/mlrun-api-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{{- end }}
spec:
accessModes:
- {{ .Values.api.persistence.accessMode | quote }}
- {{ include "mlrun.api.persistence.accessMode" . | quote }}
resources:
requests:
storage: {{ .Values.api.persistence.size | quote }}
Expand Down
6 changes: 5 additions & 1 deletion stable/mlrun/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ api:
enabled: false
existingClaim:
storageClass:
accessMode: "ReadWriteOnce"
# Access mode for the PVC. If empty, automatically inferred:
# - ReadWriteMany when worker.minReplicas > 0 (multiple pods need shared volume)
# - ReadWriteOnce when worker.minReplicas == 0 (single pod)
# If explicitly set, the provided value is used regardless of worker count.
accessMode: ""
size: "8Gi"
annotations: ~

Expand Down