[Improvement] Separate S3 storage configuration for MLRun and Kubeflow Pipeline#295
[Improvement] Separate S3 storage configuration for MLRun and Kubeflow Pipeline#295GiladShapira94 wants to merge 41 commits into
Conversation
Test CE Workflos
[Fix] Seaweed Change
# Conflicts: # .github/workflows/release.yml # charts/mlrun-ce/Chart.yaml
| @@ -1,6 +1,9 @@ | |||
| {{- if and (eq .Values.storage.mode "s3") (not .Values.storage.s3.bucket) }} | |||
There was a problem hiding this comment.
storage.s3.{accessKey,secretKey} default to empty strings but only bucket is validated. Switching to s3 mode without creds will silently produce an unusable Secret. Please also fail-fast when accessKey/secretKey are empty (unless global.infrastructure.aws.s3NonAnonymous is true).
…a-kfp # Conflicts: # charts/mlrun-ce/Chart.yaml # charts/mlrun-ce/README.md
| {{- if eq .Values.storage.mode "local" -}} | ||
| {{- .Values.storage.local.bucket -}} | ||
| {{- else -}} | ||
| {{- coalesce .Values.global.infrastructure.aws.bucketName .Values.storage.s3.bucket "mlrun" -}} |
There was a problem hiding this comment.
coalesce ordering contradicts the s3 bucket validation guard. storage-validation.yaml forces the user to set storage.s3.bucket in s3 mode (the render fails otherwise), but this line prefers global.infrastructure.aws.bucketName over it.
Either drop the storage.s3.bucket validation, or put storage.s3.bucket first in the coalesce so the required value wins:
| {{- coalesce .Values.global.infrastructure.aws.bucketName .Values.storage.s3.bucket "mlrun" -}} | |
| {{- coalesce .Values.storage.s3.bucket .Values.global.infrastructure.aws.bucketName "mlrun" -}} |
There was a problem hiding this comment.
i did not wanted to change the old flow has it may break use installation
| # - name: alerts | ||
|
|
||
| ui: | ||
| image: |
There was a problem hiding this comment.
why do we add image here how it worked before?
There was a problem hiding this comment.
As this rc is decoupled with Application version we need to add the image to install the chart with the relevant application version
📝 Description
This PR separates the storage credential configuration into two distinct paths:
storage.local.*for the bundled in-cluster SeaweedFS (always used by SeaweedFS IAM, the bucket-init job, and KFP Pipelines), andstorage.s3.*for external AWS S3 (used only by MLRun and Jupyter whenstorage.mode: s3).The default
storage.modeis changed froms3tolocal, reflecting that the default CE installation uses the bundled SeaweedFS rather than external AWS S3.New dedicated
_helpers.tplpartials (mlrun-ce.seaweedfs.s3.*andmlrun-ce.pipelines.s3.*) ensure Pipelines and SeaweedFS always resolve credentials fromstorage.local.*regardless of the activestorage.mode, eliminating the previous credential cross-contamination when switching modes.🛠️ Changes Made
charts/mlrun-ce/values.yaml:storage.modedefault froms3→localstorage.localblock (accessKey,secretKey,bucket) as the single source of truth for in-cluster SeaweedFS credentialsstorage.s3.accessKey/secretKey/bucketdefaults (now empty strings; only meaningful whenmode: s3)charts/mlrun-ce/templates/_helpers.tpl:mlrun-ce.s3.accessKey/secretKey/bucket— now branches onstorage.mode(localvss3)mlrun-ce.seaweedfs.s3.*helpers — always resolve fromstorage.local.*mlrun-ce.pipelines.s3.*helpers — always delegate tomlrun-ce.seaweedfs.s3.*mlrun-ce.artifactPath,mlrun-ce.featureStore.dataPrefix,mlrun-ce.model-endpoint.monitoring.*— replaced hardcodedglobal.infrastructure.aws.bucketName | default "mlrun"withmlrun-ce.s3.bucketcharts/mlrun-ce/templates/config/storage-secret.yaml—AWS_ENDPOINT_URL_S3now only injected whenstorage.mode: local;storage.s3no longer sets a custom endpointcharts/mlrun-ce/templates/config/storage-validation.yaml— added fail guard forstorage.mode: localwith missingstorage.local.bucketcharts/mlrun-ce/templates/config/mlrun-env-configmap.yaml— updated comment describing per-mode env varscharts/mlrun-ce/templates/pipelines/**— all pipeline templates now usemlrun-ce.pipelines.s3.*helperscharts/mlrun-ce/templates/seaweedfs/**— bucket-init job and IAM config now usemlrun-ce.seaweedfs.s3.*helperscharts/mlrun-ce/templates/NOTES.txt— S3 credentials display updated to referencestorage.local.*charts/mlrun-ce/Chart.yaml— version bumped0.12.0-rc.1→0.12.0-rc.2charts/mlrun-ce/README.md— version matrix updated to0.12.0-rc.2✅ Checklist
charts/mlrun-ce/Chart.yaml.🧪 Testing
helm lint charts/mlrun-ce— run locally to catch syntax errors in refactored helpershelm template mlrun charts/mlrun-ce -f charts/mlrun-ce/values.yaml— render all templates to verify helper resolutionstorage.mode: s3path: render with--set storage.mode=s3,storage.s3.accessKey=foo,storage.s3.secretKey=bar,storage.s3.bucket=mybucketand confirmstorage-secretdoes not containAWS_ENDPOINT_URL_S3storage.mode: localpath: render with defaults and confirmstorage-secretcontainsAWS_ENDPOINT_URL_S3pointing at the SeaweedFS servicemlpipeline-seaweedfs-artifactalways usesstorage.local.*regardless ofstorage.mode🔗 References
🚨 Breaking Changes?
Consumers upgrading from a previous release must:
Rename
storage.s3.accessKey/secretKey/bucket→storage.local.accessKey/secretKey/bucketif they were using the default SeaweedFS-backed installation (i.e., the old defaultmode: s3pointed at SeaweedFS withseaweed/seaweed123/mlrun).Set
storage.mode: s3explicitly if they were previously relying on the defaultmode: s3to pass external AWS credentials — the new default islocal.Users who supply an external AWS S3 configuration no longer need to clear
AWS_ENDPOINT_URL_S3manually; the secret now omits it whenmode: s3.🔍️ Additional Notes
admin_installation_values.yaml,non_admin_installation_values.yaml,non_admin_cluster_ip_installation_values.yaml) contain nostorage.*overrides, so they correctly inherit the new defaults fromvalues.yamlwithout modification.storage.local.*) in all modes — this is by design and is documented in the updated helper comments.Warnings
Breaking change — existing
storage.s3.*users: Anyone who previously used the default install (which wasmode: s3pointing at SeaweedFS withseaweed/seaweed123) must migrate their overrides tostorage.local.*.Their upgrade path: