Conversation
|
Claude finished @stevenolen's task —— View job
SummarySubmitted a review covering:
|
There was a problem hiding this comment.
Review: allow completely disabling connect
The implementation follows the established pattern from the Flightdeck Enabled field — API type, deepcopy, client-go apply config, CRD, controller guard, and test. Looks clean overall.
A few items worth considering:
1. Downstream side effects when Connect is disabled (site_controller_connect.go:32-35)
When Enabled=false, reconcileConnect returns early, but other reconcilers still run:
- Network policies:
reconcileConnectNetworkPolicyandreconcileConnectSessionNetworkPolicy(site_controller_networkpolicies.go:46-54) will still create Connect-related network policies even though no Connect pods exist. Should these be conditionally skipped? - Workbench
DefaultRSConnectServer:site_controller_workbench.go:164-168hardcodes the Workbench spec with a Connect URL. When Connect is disabled, this references a non-existent service. Should this be conditionally omitted?
These may be acceptable (orphan network policies are harmless, dead URL just won't resolve), but worth confirming they don't cause unexpected behavior.
2. Test coverage (site_test.go:1045-1059)
The test correctly verifies the Connect CR is not created. Two suggestions:
- Assert
apierrors.IsNotFound(err)instead of justassert.Error(t, err)to distinguish from unexpected error types. - Consider adding a complementary test confirming that when
Enabledisnil(the default), Connect is still reconciled normally — this guards against accidental inversion of the nil-check logic.
3. Unrelated generated file (connectruntimeimagespec.go)
The new ConnectRuntimeImageSpecApplyConfiguration file appears unrelated to the Enabled field change. If this was picked up by re-running code generation, that's fine — just noting it looks like a separate catch-up bundled into this PR.
4. PR description
A brief description would help reviewers understand the use case — e.g., why a user would want to disable Connect entirely (cost savings? Connect deployed separately? etc.).
Lytol
left a comment
There was a problem hiding this comment.
I might be missing something, but this just skips the reconciliation which isn't going to be enough, especially for existing workloads. At the very least IMO, it should either remove the deployment or set the replicas to 0.
| ) | ||
|
|
||
| // Skip Connect reconciliation if explicitly disabled | ||
| if site.Spec.Connect.Enabled != nil && !*site.Spec.Connect.Enabled { |
There was a problem hiding this comment.
The de-reference of the pointer is pretty weird when Go does that automatically.
I think initially i was planning to just allow them to be orphaned and clean up, since it's not really that common of a situation. added a bit of work to do the cleanup though. i'm not sure I love the impl of the |
|
Updated thoughts after looking at the latest changes — nice progress on the cleanup logic and network policies. What's looking good now
Remaining concern:
|
|
addressed the feedback. I think claude went a little overboard on the documentation, but it feels "reasonable" given the situation. the fsx volume creation blocking will leave an orphaned pv, which should happen anyway with the protections we've chosen for these volumes. |
No description provided.