-
Notifications
You must be signed in to change notification settings - Fork 70
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
breaking(prefect-server): remove confusing & duplicative environment variables #450
Conversation
charts/prefect-server/values.yaml
Outdated
prefectUiApiUrl: "" | ||
# -- sets PREFECT_UI_URL | ||
prefectUiUrl: "" | ||
# -- sets PREFECT_UI_API_URL; If you want to connect to the UI form somewhere external to the cluster (like via an ingress), you need to set this value to the ingress URL (e.g. http://app.internal.prefect.com/api). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zzstoatzz @desertaxle - let me know if my description makes sense here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me!
# -- sets PREFECT_UI_API_URL | ||
prefectUiApiUrl: "" | ||
# -- sets PREFECT_UI_URL | ||
prefectUiUrl: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was used solely to display the connection url in the notes.txt
. I've updated this to infer the UI url from the prefectUiApiUrl
prefectApiUrl: http://localhost:4200/api | ||
|
||
# -- sets PREFECT_SERVER_API_HOST | ||
prefectApiHost: 0.0.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are both redundant because:
PREFECT_SERVER_API_HOST
it is only used to construct thePREFECT_UI_API_URL
if not providedPREFECT_API_URL
is primarily used by the client, and is only used server side ifPREFECT_UI_API_URL
is not set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With these removed, maybe we can add a template to _validation.tpl to return an error/warning if the user tries to configure these removed values.
"prefectApiUrl": { | ||
"type": "string", | ||
"title": "Prefect API URL", | ||
"description": "sets PREFECT_API_URL" | ||
}, | ||
"prefectApiHost": { | ||
"type": "string", | ||
"title": "Prefect API Host", | ||
"description": "sets PREFECT_SERVER_API_HOST" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these we're left over and should have been removed in a previous PR
- name: PREFECT_SERVER_API_PORT | ||
value: {{ .Values.service.targetPort | quote }} | ||
- name: PREFECT_UI_ENABLED | ||
value: {{ .Values.server.uiConfig.enabled | quote }} | ||
{{- if .Values.server.uiConfig.prefectUiApiUrl }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove if/then configuration as this is now a required setting
@@ -71,14 +71,10 @@ spec: | |||
env: | |||
- name: HOME | |||
value: /home/prefect | |||
- name: PREFECT_API_URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we never needed to set these env vars on the background services depoyment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
{{- if or (lt $major 3) (and (eq $major 3) (lt $minor 1)) (and (eq $major 3) (eq $minor 1) (lt $patch 13)) -}} | ||
{{- fail "When running background services separately, Prefect version must be 3.1.13 or higher" -}} | ||
{{- end -}} | ||
{{- define "prefect-server.validatePrefectServerApiSettings" -}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if any of these three values are set, the validation will fail the install/upgrade and alert the user on what needs to be changed
@@ -1,4 +1,5 @@ | |||
{{- if .Values.backgroundServices.runAsSeparateDeployment }} | |||
{{- include "prefect-server.validatePrefectVersion" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this calls the validation helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just call the validation helper in NOTES.txt
? It's been a little while since I've used this, but I think that's where I've called it in the past so it's in a central location instead of being tied to a specific template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
@@ -1,3 +1,4 @@ | |||
{{- include "prefect-server.validatePrefectServerApiSettings" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this calls the validation helper
@@ -42,7 +42,7 @@ | |||
"type": "object", | |||
"title": "Prefect", | |||
"description": "global prefect configuration", | |||
"additionalProperties": false, | |||
"additionalProperties": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this allows for the validation helper to be the one to fail the helm install/upgrade, rather than the json schema. It will provide more direct guidance.
@@ -1,4 +1,5 @@ | |||
{{- if .Values.backgroundServices.runAsSeparateDeployment }} | |||
{{- include "prefect-server.validatePrefectVersion" . }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just call the validation helper in NOTES.txt
? It's been a little while since I've used this, but I think that's where I've called it in the past so it's in a central location instead of being tied to a specific template.
Co-authored-by: Mitchell Nielsen <mitchnielsen@users.noreply.github.com>
Co-authored-by: Mitchell Nielsen <mitchnielsen@users.noreply.github.com>
Co-authored-by: Mitchell Nielsen <mitchnielsen@users.noreply.github.com>
This PR contains a breaking change. See the upgrading document for details on how to upgrade. Specifically, this PR removes the
prefectApiUrl
andprefectApiHost
values. Instead, the chart will now use theprefectUiApiUrl
value to define the URL that is provided to the UI by and for the APITesting
prefect-server
chartgit clone git@github.com:PrefectHQ/prefect-helm.git git checkout adjust-prefect-server-settings cd prefect-helm/charts/prefect-server
helm install prefect-server .
background services
helm upgrade prefect-server .
Resolves https://linear.app/prefect/issue/PLA-1051/fix-prefect-helm-server-values-and-docs-re-server-env-vars