Skip to content

Commit

Permalink
Merge pull request #25 from adelcast/dev/adelcast/mage_base_path
Browse files Browse the repository at this point in the history
add support for non empty MAGE_BASE_PATH
  • Loading branch information
wangxiaoyou1993 authored Oct 25, 2023
2 parents e1e26df + a05a793 commit e9a18ec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions charts/mageai/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,16 @@ Generate chart secret name
{{- define "mageai.secretName" -}}
{{ default (printf "%s-secret-env" (include "mageai.fullname" .)) .Values.existingSecret }}
{{- end -}}

{{/*
Base path
*/}}
{{- define "mageai.basePath" -}}
{{- if .Values.extraEnvs }}
{{- range .Values.extraEnvs }}
{{- if eq .name "MAGE_BASE_PATH" }}
{{- printf "/%s" .value }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion charts/mageai/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spec:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "mageai.fullname" . }}:{{ .Values.service.port }}']
args: ['{{ include "mageai.fullname" . }}:{{ .Values.service.port }}{{ include "mageai.basePath" . }}']
restartPolicy: Never

0 comments on commit e9a18ec

Please sign in to comment.