Skip to content

Commit

Permalink
CEML-239: Fix and improve auto-mount params (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpirogovski authored Sep 23, 2024
1 parent a68decf commit 5f40ddb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/mlrun-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mlrun-ce
version: 0.6.4-rc13
version: 0.6.4-rc14
description: MLRun Open Source Stack
home: https://iguazio.com
icon: https://www.iguazio.com/wp-content/uploads/2019/10/Iguazio-Logo.png
Expand Down
15 changes: 15 additions & 0 deletions charts/mlrun-ce/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ http://minio.{{.Release.Namespace}}.svc.cluster.local:{{ .Values.minio.service.p
minio.{{.Release.Namespace}}.svc.cluster.local
{{- end -}}

{{/*
MLRun storage auto mount params
Global toggle is for fast toggling between on-prem/standalone and s3 cases
Can be overriden if params are explicitly specified
*/}}
{{- define "mlrun.storage.auto.mount.params" -}}
{{- if .Values.mlrun.storageAutoMountParams -}}
{{ .Values.mlrun.storageAutoMountParams }}
{{- else if eq .Values.global.infrastructure.aws.s3NonAnonymous "False" -}}
"aws_access_key=minio,aws_secret_key=minio123,endpoint_url={{ include "mlrun-ce.minio.service.url" . }}"
{{- else -}}
"non_anonymous=True"
{{- end -}}
{{- end -}}

{{/*
Mlrun DB labels
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/mlrun-ce/templates/config/jupyter-env-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ metadata:
data:
S3_ENDPOINT_URL: {{ include "mlrun-ce.minio.service.url" . }}
MLRUN_STORAGE__AUTO_MOUNT_TYPE: s3
S3_NON_ANONYMOUS: {{ .Values.global.infrastructure.aws.s3NonAnonymous | default "True" | quote }}
S3_NON_ANONYMOUS: {{ .Values.global.infrastructure.aws.s3NonAnonymous | quote | default "\"True\"" }}
MLRUN_CE__MODE: {{ .Values.jupyterNotebook.ce.mode | default "full" }}
MLRUN_CE__VERSION: {{ .Chart.Version }}
MLRUN_FUNCTION__SPEC__SERVICE_ACCOUNT__DEFAULT: {{ .Values.mlrun.api.functionSpecServiceAccountDefault | default "" | quote }}
MLRUN_FEATURE_STORE__DATA_PREFIXES__DEFAULT: s3:///{{ $bucket_name }}/projects/{project}/FeatureStore/{name}/{kind}
AWS_SECRET_ACCESS_KEY: {{ .Values.minio.rootPassword }}
AWS_ACCESS_KEY_ID: {{ .Values.minio.rootUser }}
MLRUN_STORAGE__AUTO_MOUNT_PARAMS: {{ .Values.mlrun.storageAutoMountParams | default "non_anonymous=True" }}
MLRUN_STORAGE__AUTO_MOUNT_PARAMS: {{ include "mlrun.storage.auto.mount.params" . }}
MLRUN_ARTIFACT_PATH: s3://{{ $bucket_name }}/projects/{{ `{{run.project}}` }}/artifacts{{ `{{run.uid}}` }}
MLRUN_FEATURE_STORE__DATA_PREFIXES__NOSQL: ""
MLRUN_FEATURE_STORE__DEFAULT_TARGETS: parquet
Expand Down
5 changes: 2 additions & 3 deletions charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ kind: ConfigMap
metadata:
name: mlrun-common-env
data:
S3_NON_ANONYMOUS: {{ .Values.global.infrastructure.aws.s3NonAnonymous | default "True" | quote }}
S3_NON_ANONYMOUS: {{ .Values.global.infrastructure.aws.s3NonAnonymous | quote | default "\"True\"" }}
MLRUN_STORAGE__AUTO_MOUNT_TYPE: s3
MLRUN_STORAGE__AUTO_MOUNT_PARAMS: "aws_access_key=minio,aws_secret_key=minio123,endpoint_url={{ include "mlrun-ce.minio.service.url" . }}"
MLRUN_STORAGE__AUTO_MOUNT_PARAMS: {{ include "mlrun.storage.auto.mount.params" . }}
MLRUN_HTTPDB__PROJECTS__FOLLOWERS: nuclio
S3_ENDPOINT_URL: {{ include "mlrun-ce.minio.service.url" . }}
MLRUN_FUNCTION__SPEC__SERVICE_ACCOUNT__DEFAULT: {{ .Values.mlrun.api.functionSpecServiceAccountDefault | default "" | quote }}
AWS_SECRET_ACCESS_KEY: {{ .Values.minio.rootPassword }}
AWS_ACCESS_KEY_ID: {{ .Values.minio.rootUser }}
MLRUN_STORAGE__AUTO_MOUNT_PARAMS: {{ .Values.mlrun.storageAutoMountParams | default "non_anonymous=True" }}
MLRUN_HTTPDB__REAL_PATH: s3://
MLRUN_ARTIFACT_PATH: s3://{{ $bucket_name }}/projects/{{ `{{run.project}}` }}/artifacts
MLRUN_FEATURE_STORE__DATA_PREFIXES__DEFAULT: s3://{{ $bucket_name }}/projects/{project}/FeatureStore/{name}/{kind}
Expand Down
2 changes: 1 addition & 1 deletion charts/mlrun-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ global:
loadBalancerName: ~
aws:
bucketName: ~
s3NonAnonymous: True
s3NonAnonymous: "False"
domainNameCertificate: ~

nuclio:
Expand Down

0 comments on commit 5f40ddb

Please sign in to comment.