-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I've been experimenting with the Prefect Operator and encountered several issues along with suggestions for improvement. Here’s a detailed summary:
PREFECT_API_URLConfiguration
- Issue: The
PREFECT_API_URLforPrefectServermust be set manually viaspec.settings. Otherwise, it defaults tohttp://0.0.0.0:4200/api, which triggers an error in the UI. - Suggestion: Consider adding CRD support for defining ingress/gateway and automatically setting
PREFECT_API_URL.
- PrefectDeployment Namespace Resolution
- Issue: Creating a
PrefectDeploymentfails because the deployment usesprefect.default.svcas the default API hostname, even if Prefect is deployed in a different namespace. - Workaround: Manually setting
server.namespaceandworkPool.namespacein the CRD resolves the issue. - Suggestion: Use the namespace of the
PrefectDeploymentby default.
- PrefectWorkPool Naming Prefix
- Issue: The
PrefectWorkPoolname is prefixed withpool-. For example, a CRD namedprefect-work-poolappears aspool-prefect-work-poolin the UI, and that is the name required for referencing inPrefectDeployment. - Suggestion: Remove the prefix.
- Incorrect Handling of HTTP 201 Responses
-
Issue: The operator treats successful
201 Createdresponses as errors:error: failed to create or get flow: API request failed with status 201This leads to unnecessary error logs despite successful flow creation.
- RBAC/ServiceAccount Issues
-
Issue: Running a
PrefectDeploymentfails with:User "system:serviceaccount:my-namespace:default" cannot create resource "jobs" in API group "batch" in namespace "default" -
Observation: It seems the default service account lacks necessary permissions, and there’s no clear guidance on configuring it.
-
Suggestion: Provide documentation or automation to ensure required RBAC roles are set up correctly.
- Reconciliation Errors When Updating Work Pools
-
Issue: Updating a
PrefectWorkPooltriggers multiple reconciliation attempts and logs errors like:Operation cannot be fulfilled on deployments.apps "prefect-work-pool": the object has been modified; please apply your changes to the latest version and try againAlthough the CRD updates successfully, the operator logs a series of errors, making troubleshooting difficult.
If you would like it, I would be interested in investigating and opening PRs.