Skip to content

Conversation

@nschmeller
Copy link
Contributor

Currently, user-specified env vars are treated differently between the metaflow-service and metaflow-ui Helm charts.

In the metaflow-service Helm chart, user-specified env vars are placed after chart-specified env vars. In this case, K8s will treat them with priority based on order. However, in the metaflow-ui Helm chart, the chart-specified env vars are placed last, giving them priority. Besides being inconsistent, this is problematic as we want to set our own env vars that conflict with the chart-specified env vars (in this case, MF_METADATA_DB_USER and MF_METADATA_DB_PSWD).

This commit switches the layout of the metaflow-ui env vars to prioritize user-specified over chart-specified env vars.

metaflow-service layout:

env:
{{- include "metaflow-service.metadatadbEnvVars" . | nindent 12 }}
{{- with .Values.env }}

metaflow-ui layout:

env:
{{- with .Values.uiBackend.env }}
{{- toYaml . | nindent 12 }}
{{- end }}
- name: UI_ENABLED
value: "1"
- name: PATH_PREFIX
value: "/api"
- name: MF_DATASTORE_ROOT
value: {{ .Values.uiBackend.metaflowDatastoreSysRootS3 | quote }}
- name: METAFLOW_DATASTORE_SYSROOT_S3
value: {{ .Values.uiBackend.metaflowDatastoreSysRootS3 | quote }}
{{- if .Values.uiBackend.metaflowS3EndpointURL }}
- name: METAFLOW_S3_ENDPOINT_URL
value: {{ .Values.uiBackend.metaflowS3EndpointURL | quote }}
{{- end }}
- name: LOGLEVEL
value: "DEBUG"
- name: METAFLOW_SERVICE_URL
value: {{ .Values.uiBackend.metaflowServiceURL | quote }}
- name: METAFLOW_DEFAULT_DATASTORE
value: {{ .Values.uiBackend.metaflowDefaultDatastore | quote }}
- name: METAFLOW_DEFAULT_METADATA
value: "service"
{{- include "metaflow-ui.metadatadbEnvVars" . | nindent 12 }}

Currently, user-specified env vars are treated differently between the `metaflow-service` and `metaflow-ui` Helm charts. 

In the `metaflow-service` Helm chart, user-specified env vars are placed after chart-specified env vars. In this case, K8s will treat them with priority based on order. However, in the `metaflow-ui` Helm chart, the chart-specified env vars are placed last, giving them priority. Besides being inconsistent, this is problematic as we want to set our own env vars that conflict with the chart-specified env vars (in this case, `MF_METADATA_DB_USER` and `MF_METADATA_DB_PSWD`). 

This commit switches the layout of the `metaflow-ui` env vars to prioritize user-specified over chart-specified env vars. 

`metaflow-service` layout: https://github.com/outerbounds/metaflow-tools/blob/d24572c0a1610410ff586f1cd87312edc1c34cf1/charts/metaflow/charts/metaflow-service/templates/deployment.yaml#L73-L75

`metaflow-ui` layout: https://github.com/outerbounds/metaflow-tools/blob/d24572c0a1610410ff586f1cd87312edc1c34cf1/charts/metaflow/charts/metaflow-ui/templates/backend_deployment.yaml#L51-L75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant