Andrea Ceruti
03/25/2025, 3:04 PMMarvin
03/25/2025, 3:04 PMworker.selfHostedServerApiConfig.apiUrl
to be explicitly set.
Previously, setting PREFECT_API_URL
as an environment variable was sufficient. Now, it appears that the Helm chart has been updated to require this configuration to be directly specified in the chart's values.
To resolve this, you might need to update your Helm chart configuration to set worker.selfHostedServerApiConfig.apiUrl
explicitly. Check the Helm chart documentation for the exact syntax and placement. If you need further assistance, I can help you search for more specific documentation or examples.Andrea Ceruti
03/25/2025, 3:07 PMMarvin
03/25/2025, 3:07 PMbash
helm repo add prefect <https://prefecthq.github.io/prefect-helm>
helm repo update
2. Create a Kubernetes secret for your Prefect API key (if needed):
bash
kubectl create secret generic prefect-api-key \
--namespace=<your-namespace> --from-literal=key=your-prefect-cloud-api-key
3. Install the Prefect worker in your desired namespace:
bash
helm install prefect-worker prefect/prefect-worker \
--namespace <your-namespace> \
-f values.yaml
Replace <your-namespace>
with the name of the namespace where you want to deploy the worker. This should ensure that your Prefect worker pod is created within the specified namespace. For more detailed instructions, you can refer to the Kubernetes deployment guide.Andrea Ceruti
03/25/2025, 3:20 PMMarvin
03/25/2025, 3:20 PMprefect-worker-base-job-template.json
is correctly formatted and includes all desired changes, such as namespace, TTL, and generated name.
2. Use Helm Correctly: When deploying with Helm, make sure your command correctly points to the custom template:
bash
helm install prefect-worker prefecthq/prefect-worker \
-n demo \
-f worker-values.yaml \
--set-file worker.config.baseJobTemplate.configuration=prefect-worker-base-job-template.json
3. Check Applied Configuration: After deployment, verify that the configuration is correctly applied:
- Navigate to the Prefect GUI.
- In the Work Pools section, click on the "Edit" button.
- Under "Advanced Job Template", ensure your custom configuration is displayed.
If the default template is still showing, it might indicate that the custom configuration wasn't applied correctly. Double-check the Helm command and the paths to your configuration files. Additionally, consult the Prefect Work Pools documentation for more details on customizing job templates.