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

   ## Summary
   
   Adds a `cronSchedule` field to the clone lifecycle task that accepts a 
standard 5-field cron expression (e.g., `"0 2 * * *"`). When configured, the 
operator autonomously re-triggers the full lifecycle pipeline (clone → migrate 
→ init) at each cron boundary — enabling CI-free periodic staging refreshes 
from production.
   
   The schedule tick (most recent past time matching the expression) is 
included in the clone task's checksum inputs, so boundary crossings naturally 
cascade downstream through the existing chain propagation mechanism. The 
operator uses `RequeueAfter` to wake at the next cron tick.
   
   **Key design decisions:**
   - **No spec mutation** — the operator never patches 
`spec.lifecycle.clone.trigger`; avoids RBAC expansion, GitOps drift, and 
reconcile loops
   - **Extensible type hierarchy** — `SchedulableBaseTaskSpec` extends 
`BaseTaskSpec`; enabling scheduling for init in the future requires switching 
its embedding (one-line CRD change) + adding the tick to `initInputs()` (~3 
lines)
   - **Pure checksum model** — no stored state needed; the schedule tick is 
derived from the clock on each reconcile
   - **New `internal/schedule/` package** — pure Go, zero controller-runtime 
deps, uses `robfig/cron/v3` (same library as K8s CronJob controller)
   
   ## Details
   
   - `SchedulableBaseTaskSpec` adds `cronSchedule` (MinLength=9, MaxLength=256)
   - `CloneTaskSpec` embeds `SchedulableBaseTaskSpec` instead of `BaseTaskSpec`
   - `TaskRefStatus` gains `lastScheduledAt` and `nextScheduleAt` fields
   - Injectable `Now func() time.Time` on `SupersetReconciler` for 
deterministic testing
   - `activeSchedules()` helper is pre-wired for future tasks — adding init 
scheduling requires one line


-- 
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