villebro opened a new pull request, #46:
URL: https://github.com/apache/superset-kubernetes-operator/pull/46

   ## Summary
   
   Rewrites the maintenance page traffic handoff to eliminate the orphan-delete 
pattern, which had three high-severity issues: a 503 gap on return (Service 
selector pointed to nothing between maintenance teardown and web-server 
readiness), resource leaks on parent deletion (Service had no owner during 
maintenance), and excessive complexity (orphan-delete + owner-ref juggling + 
re-adoption).
   
   The parent Superset CR now permanently owns the web-server Service and 
switches its selector based on lifecycle state. The `SupersetMaintenancePage` 
child CRD is removed — the maintenance Deployment is managed directly by the 
parent controller.
   
   Additionally, decomposes `superset_controller.go` (2178 lines) into focused 
files.
   
   ## Changes
   
   **Service ownership (fixes 503 gap + deletion leak):**
   - Parent owns the web-server Service via `reconcileWebServerService()` — 
purely declarative, reads `MaintenanceActive` to determine selector (web-server 
vs maintenance-page labels)
   - `reconcileMaintenanceReturn()` gates selector switchback on web-server 
Deployment readiness
   - Handles migration from child CR ownership by clearing stale owner 
references
   
   **Maintenance page simplification:**
   - Removes `SupersetMaintenancePage` CRD (types, manifests, Helm chart, child 
controller entry)
   - Maintenance Deployment created directly by parent (no child CRD 
indirection)
   - Removes `takeoverWebServerService()`, `releaseWebServerService()`, 
`createMaintenanceWebServerService()` — the entire orphan-delete pattern
   
   **Controller decomposition:**
   - `superset_controller.go` → 557 lines (core reconciler, status, shared 
resources)
   - New `lifecycle.go` (1109 lines) — lifecycle orchestration, task 
reconciliation, clone
   - New `config_builder.go` (382 lines) — config input building, env vars, 
operator-injected
   - New `drain.go` (156 lines) — drain logic
   - New `schedule.go` (107 lines) — cron scheduling
   
   ## Breaking changes
   
   - `SupersetMaintenancePage` CRD removed (internal-only, never user-created)
   - `SupersetWebServer` child controller no longer creates a Service 
(standalone child CRs without a parent will not get a Service)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to