Skip to content

Commit

Permalink
Use Common Env Config Map as Default Env
Browse files Browse the repository at this point in the history
Use Common Env Config Map as Default Env
  • Loading branch information
quaark authored Sep 6, 2022
2 parents d9aacf7 + 597e51e commit 4fba6b3
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
2 changes: 1 addition & 1 deletion charts/mlrun-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 9 additions & 3 deletions charts/mlrun-ce/override-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions charts/mlrun-ce/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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/
23 changes: 6 additions & 17 deletions charts/mlrun-ce/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4fba6b3

Please sign in to comment.