Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UI backend url with ingress #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions k8s/helm/metaflow/charts/metaflow-ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ Create the name of the service account to use
{{- end }}
{{- end }}

{{/*
Create the backendURL, which differs if we use an ingress or not.
*/}}
{{- define "metaflow-ui.staticUIBackendURL" -}}
{{- if .Values.ingress.enabled }}
{{- default "http://localhost/api/" .Values.uiStatic.metaflowUIBackendURL }}
{{- else }}
{{- default "http://localhost:8083/api/" .Values.uiStatic.metaflowUIBackendURL }}
{{- end }}
{{- end }}

{{- define "metaflow-ui.metadatadbEnvVars" -}}
- name: MF_METADATA_DB_NAME
value: {{ .Values.uiBackend.metadatadb.name | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
port: http
env:
- name: METAFLOW_SERVICE
value: {{ .Values.uiStatic.metaflowUIBackendURL | quote }}
value: {{ include "metaflow-ui.staticUIBackendURL" . | quote }}
{{- range .Values.env }}
- name: {{ .name | quote }}
value: {{ .value | quote }}
Expand Down
2 changes: 1 addition & 1 deletion k8s/helm/metaflow/charts/metaflow-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ uiStatic:
# - name: var_name
# value: "var_value"

metaflowUIBackendURL: "http://localhost:8083/api/"
metaflowUIBackendURL: ""

service:
type: ClusterIP
Expand Down