Add support for managing base job templates#194
Conversation
ae9a37d to
48aa757
Compare
chrisguidry
left a comment
There was a problem hiding this comment.
Looks pretty solid from my seat, would just like to see some more unit tests if you have the bandwidth.
| type PrefectWorkPoolStatus struct { | ||
| // Id is the workPool ID from Prefect | ||
| // +optional | ||
| Id *string `json:"id,omitempty"` |
There was a problem hiding this comment.
👍 How were we getting away without the Id before? I guess the API mostly deals in work pool names rather than IDs, but this is a good addition for sure.
bf5aa12 to
5a47694
Compare
5a47694 to
81661ae
Compare
81661ae to
586845f
Compare
| Value *runtime.RawExtension `json:"value,omitempty"` | ||
| } | ||
|
|
||
| // TODO - no admission webhook yet |
There was a problem hiding this comment.
Great call, we've been needing this for a while, I made an issue for it: #195
chrisguidry
left a comment
There was a problem hiding this comment.
Love the direction! Tag me when you're ready for a review 🙇
Sorry for the delay.. ready! @chrisguidry |
1dadbaf to
571af81
Compare
chrisguidry
left a comment
There was a problem hiding this comment.
Thank you for this one, @tinkerborg!
|
@tinkerborg and @Blarc, this is merged now and there are dev versions of the image and chart available: Image: Once we've had some chances to test this out, I'll cut a release. |
The operator needs to read ConfigMaps from any namespace where users deploy PrefectWorkPools or PrefectServers. This was missed when PR #194 added ConfigMap watching for base job templates - the controller calls `Watches(&corev1.ConfigMap{}, ...)` which requires cluster-wide list/watch permissions to sync the informer at startup. Without these permissions, the operator fails with RBAC errors and enters CrashLoopBackOff. Closes #234 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## Summary The operator needs to read ConfigMaps from any namespace where users deploy PrefectWorkPools or PrefectServers. This was missed when PR #194 added ConfigMap watching for base job templates - the controller calls `Watches(&corev1.ConfigMap{}, ...)` which requires cluster-wide list/watch permissions to sync the informer at startup. Without these permissions, the operator fails with RBAC errors and enters CrashLoopBackOff. The existing unit tests didn't catch this because envtest doesn't enforce RBAC - it's a simulated API server that grants all permissions. This kind of issue only surfaces when deploying to a real cluster. To confirm this, I deployed to a local cluster: ``` $ kubectl get pods -n prefect-system NAME READY STATUS RESTARTS AGE prefect-operator-564fbfd7c9-kr5k6 1/1 Running 0 4m30s ``` Closes #234 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This implements support for managing workpool base job templates.
Opening as a draft for now and will convert to regular PR after finishing unit tests.
fixes #189