From 7d5d202900063c68b0630d171a3b4724d3be7a11 Mon Sep 17 00:00:00 2001 From: quaark Date: Tue, 6 Sep 2022 09:21:31 +0300 Subject: [PATCH 1/2] env refactor 2 --- charts/mlrun-ce/override-full.yaml | 12 +++++++--- charts/mlrun-ce/templates/_helpers.tpl | 7 ++++++ .../templates/config/mlrun-env-configmap.yaml | 14 +++++++---- charts/mlrun-ce/values.yaml | 23 +++++-------------- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/charts/mlrun-ce/override-full.yaml b/charts/mlrun-ce/override-full.yaml index 363e964e..13c7c151 100644 --- a/charts/mlrun-ce/override-full.yaml +++ b/charts/mlrun-ce/override-full.yaml @@ -15,9 +15,15 @@ mlrun: enabled: true annotations: helm.sh/resource-policy: "keep" - envFrom: - - configMapRef: - name: mlrun-override-full-env + extraEnv: + - name: MLRUN_SPARK_OPERATOR_VERSION + value: spark-3 + - name: MLRUN_SPARK_APP_IMAGE + value: gcr.io/iguazio/spark-app + - name: MLRUN_SPARK_APP_IMAGE_TAG + value: v3.2.1-mlk + - name: MLRUN_KFP_URL + value: http://ml-pipeline.mlrun.svc.cluster.local:8888 db: persistence: enabled: true diff --git a/charts/mlrun-ce/templates/_helpers.tpl b/charts/mlrun-ce/templates/_helpers.tpl index 73bf083f..11886e71 100644 --- a/charts/mlrun-ce/templates/_helpers.tpl +++ b/charts/mlrun-ce/templates/_helpers.tpl @@ -114,6 +114,13 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Minio Service URL +*/}} +{{- define "mlrun-ce.minio.service.url" -}} +http://minio.mlrun.svc.cluster.local:{{ .Values.minio.service.port }} +{{- end -}} + {{/* Mlrun DB labels diff --git a/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml b/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml index a1813401..934e2653 100644 --- a/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml +++ b/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml @@ -1,9 +1,13 @@ apiVersion: v1 kind: ConfigMap metadata: - name: mlrun-override-full-env + name: mlrun-common-env data: - MLRUN_SPARK_OPERATOR_VERSION: spark-3 - MLRUN_SPARK_APP_IMAGE: gcr.io/iguazio/spark-app - MLRUN_SPARK_APP_IMAGE_TAG: v3.2.1-mlk - MLRUN_KFP_URL: http://ml-pipeline.mlrun.svc.cluster.local:8888 + 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_HTTPDB__PROJECTS__FOLLOWERS: nuclio + S3_ENDPOINT_URL: {{ include "mlrun-ce.minio.service.url" . }} + AWS_SECRET_ACCESS_KEY: {{ .Values.minio.rootPassword }} + AWS_ACCESS_KEY_ID: {{ .Values.minio.rootUser }} + MLRUN_HTTPDB__REAL_PATH: s3:// + MLRUN_ARTIFACT_PATH: s3://mlrun/ diff --git a/charts/mlrun-ce/values.yaml b/charts/mlrun-ce/values.yaml index 7169970e..94a9b2d2 100644 --- a/charts/mlrun-ce/values.yaml +++ b/charts/mlrun-ce/values.yaml @@ -92,23 +92,12 @@ mlrun: accessMode: "ReadWriteOnce" size: "8Gi" annotations: ~ - extraEnv: - - name: MLRUN_STORAGE__AUTO_MOUNT_TYPE - value: s3 - - name: MLRUN_STORAGE__AUTO_MOUNT_PARAMS - value: "aws_access_key=minio,aws_secret_key=minio123,endpoint_url=http://minio.mlrun.svc.cluster.local:9000" - - name: MLRUN_HTTPDB__PROJECTS__FOLLOWERS - value: nuclio - - name: S3_ENDPOINT_URL - value: http://minio.mlrun.svc.cluster.local:9000 - - name: AWS_SECRET_ACCESS_KEY - value: minio123 - - name: AWS_ACCESS_KEY_ID - value: minio - - name: MLRUN_HTTPDB__REAL_PATH - value: s3:// - - name: MLRUN_ARTIFACT_PATH - value: s3://mlrun/ + envFrom: + - configMapRef: + name: mlrun-common-env + - configMapRef: + name: mlrun-override-env + optional: true extraPersistentVolumeMounts: ~ ui: fullnameOverride: mlrun-ui From 597e51e533e43c3b467f05cbcc2151d4644aa1c7 Mon Sep 17 00:00:00 2001 From: quaark Date: Tue, 6 Sep 2022 09:21:57 +0300 Subject: [PATCH 2/2] bump chart --- charts/mlrun-ce/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/mlrun-ce/Chart.yaml b/charts/mlrun-ce/Chart.yaml index b54c67be..cbeb0513 100644 --- a/charts/mlrun-ce/Chart.yaml +++ b/charts/mlrun-ce/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -version: 0.0.11 +version: 0.0.12 name: mlrun-ce description: MLRUn Open Source Stack home: https://iguazio.com