@@ -9,6 +9,67 @@ The format is based on the regulated environment requirements:
99
1010---
1111
12+ ## [ 2026-06-13 16:30] - Spot-schedule provider API: CRD scaffolding + ScheduledMachine v1beta1 (Phase 1)
13+
14+ ** Author:** Erick Bourgeois
15+
16+ ### Changed
17+ - ` src/crd.rs ` : ` ScheduledMachine ` bumped to ** ` v1beta1 ` ** (storage) — ` schedule `
18+ is now ` Option<ScheduleSpec> ` and a new ` spot_schedule: Option<SpotScheduleRef> `
19+ field is added (ADR 0006). New ` SpotScheduleRef ` type (group-pinned ` apiVersion `
20+ via ` x-kubernetes-validations ` CEL, ` deny_unknown_fields ` , same-namespace
21+ ` name ` ). New ` ScheduledMachineSpec::effective_schedule() ` accessor +
22+ ` ScheduleSpec::inactive_placeholder() ` (a spotSchedule-only machine evaluates
23+ inactive until the Phase 2 resolver lands). New frozen, ** deprecated**
24+ ` pub mod v1alpha1 ` ScheduledMachine (served for back-compat; superset relation
25+ keeps ` conversion: None ` lossless — ADR 0007). New reference provider type
26+ ` CapitalMarketsSchedule ` (group ` spotschedules.5spot.finos.org/v1alpha1 ` ):
27+ spec (timezone/sessions/holidays/earlyCloses) + duck-typed
28+ ` status.active ` /conditions/observedGeneration.
29+ - ` src/constants.rs ` : ` API_VERSION ` /` API_VERSION_FULL ` → ` v1beta1 ` (controller's
30+ storage version, used for owner refs); new ` API_VERSION_LEGACY ` ,
31+ ` SPOT_SCHEDULE_API_GROUP ` , ` SPOT_SCHEDULE_API_VERSION ` ,
32+ ` CONDITION_TYPE_SPOT_SCHEDULE_RESOLVED ` , and the four
33+ ` REASON_SPOT_SCHEDULE_* ` resolution reasons.
34+ - ` src/bin/crdgen.rs ` : rewritten to ` merge_crds(v1alpha1, v1beta1, storage=v1beta1) `
35+ for ` ScheduledMachine ` (+ inject the at-least-one-of ` schedule ` /` spotSchedule `
36+ CEL into the v1beta1 spec schema) and emit the ` CapitalMarketsSchedule ` CRD;
37+ now writes both files under ` deploy/crds/ ` directly. ` Makefile ` ` crds ` target
38+ updated (no stdout redirect).
39+ - ` src/bin/crddoc.rs ` : documents the v1beta1/v1alpha1 versioning, the
40+ ` spotSchedule ` field, and the at-least-one-of rule; ` docs/src/reference/api.md `
41+ regenerated.
42+ - ` src/reconcilers/scheduled_machine.rs ` : route ` spec.schedule ` reads through
43+ ` effective_schedule() ` (optional schedule); call the new
44+ ` validate_activation_source ` in ` reconcile_inner ` 's defence-in-depth block.
45+ - ` src/reconcilers/helpers.rs ` : new ` validate_activation_source ` — runtime mirror
46+ of the CRD spec-level CEL (at least one of ` schedule ` /` spotSchedule ` , plus the
47+ ` spotschedules.5spot.finos.org ` group pin), so the invariant holds even
48+ without the apiserver CEL (pre-1.25, pre-existing stored objects, direct API
49+ writes). The CRD CEL is structural-schema validation (apiserver-enforced), not
50+ a VAP — this is the belt-and-braces runtime guard.
51+ - ` deploy/crds/scheduledmachine.yaml ` (multi-version, regenerated) +
52+ ` deploy/crds/capitalmarketsschedule.yaml ` (NEW).
53+ - ` examples/scheduledmachine-spot-schedule.yaml ` ,
54+ ` examples/capitalmarketsschedule.yaml ` : NEW.
55+ - Tests: ` src/crd_tests.rs ` adds SpotScheduleRef round-trip/group-pin,
56+ effective_schedule, spotSchedule-only round-trip, multi-version single-storage
57+ invariant, and CapitalMarketsSchedule coverage; all SM-spec literals across
58+ ` *_tests.rs ` + ` tests/ ` updated for ` Option ` schedule + ` spot_schedule ` .
59+ - Docs: ` docs/src/installation/crds.md ` , ` docs/src/reference/spot-schedule-contract.md ` .
60+
61+ ### Why
62+ Phase 1 of the spot-schedule provider roadmap: introduce the ` spec.spotSchedule `
63+ contract surface and the reference provider CRD, landed on a new ` ScheduledMachine `
64+ ` v1beta1 ` version (first exercise of the ADR 0007 multi-version machinery). The
65+ controller-side resolver/watch follow in later phases.
66+
67+ ### Impact
68+ - [ ] Breaking change
69+ - [x] Requires cluster rollout (apply regenerated CRDs: ` kubectl apply -f deploy/crds/ ` )
70+ - [ ] Config change only
71+ - [ ] Documentation only
72+
1273## [ 2026-06-13 14:00] - ADR 0006/0007 + CALM: pluggable spot-schedule provider contract (Phase 0)
1374
1475** Author:** Erick Bourgeois
0 commit comments