@@ -9,6 +9,110 @@ The format is based on the regulated environment requirements:
99
1010---
1111
12+ ## [ 2026-06-16 13:00] - ADR 0009: examples, time-based provider deploy manifests, and prose docs
13+
14+ ** Author:** Erick Bourgeois
15+
16+ ### Changed
17+ - ` src/crd.rs ` : ` ScheduledMachineSpec.schedule ` is now a ** required**
18+ ` SpotScheduleRef ` (was ` Option<ScheduleSpec> ` ); removed ` spec.spotSchedule ` ;
19+ added top-level ` spec.enabled ` master switch; removed ` ScheduleSpec ` and the
20+ ` v1alpha1 ` ` ScheduledMachine ` module; added the ` TimeBasedSpotSchedule ` CRD
21+ (spec + status) in ` spotschedules.5spot.finos.org ` . ` is_enabled() ` now reads
22+ ` spec.enabled ` .
23+ - ` src/providers/time_based.rs ` (+tests) and ` src/bin/spot_schedule_time_based.rs ` :
24+ NEW core/default provider controller — ` is_active_at ` /` next_transition ` /
25+ ` reconcile ` , mirroring ` capital_markets ` ; publishes ` status.active ` .
26+ - ` src/reconcilers/{scheduled_machine,helpers,spot_schedule_watch}.rs ` : drive
27+ activation solely from the single ` spec.schedule ` provider verdict; removed
28+ ` evaluate_schedule ` ; simplified ` compose_should_be_active ` (verdict + hold-last
29+ -state); replaced ` validate_activation_source ` with ` validate_schedule_ref ` ;
30+ emergency-reclaim loop-breaker now patches ` spec.enabled=false ` (never the
31+ shared provider object); watch reverse-index keys off ` spec.schedule ` .
32+ - ` src/metrics.rs ` (+tests): added ` fivespot_time_based_active ` /
33+ ` fivespot_time_based_transitions_total ` + record fns.
34+ - ` src/bin/{crdgen,crddoc}.rs ` : emit the ` TimeBasedSpotSchedule ` CRD; single
35+ ` v1beta1 ` ` ScheduledMachine ` (dropped the multi-version merge + schedule/
36+ spotSchedule XOR CEL); api.md regenerated.
37+ - ` deploy/admission/validatingadmissionpolicy.yaml ` : removed the inline-schedule
38+ rules (cron/day/hour) and the "at least one" rule; the remaining schedule rule
39+ pins ` spec.schedule.apiVersion ` to the provider group; ` v1beta1 ` -only.
40+ - ` docs/adr/0009-*.md ` (+ index; amended 0006 §1/§3 and 0007);
41+ ` docs/architecture/calm/architecture.json ` (provider model + flows; validated,
42+ diagrams regenerated).
43+ - ` examples/scheduledmachine-*.yaml ` : migrated all to ` 5spot.finos.org/v1beta1 ` ,
44+ added ` spec.enabled: true ` , and replaced every inline ` schedule: ` / removed
45+ ` spotSchedule: ` block with a single ` spec.schedule: ` provider reference. Basic
46+ / weekend / tainted / bad-taint / kata / child-cluster now reference a
47+ ` TimeBasedSpotSchedule ` ; ` scheduledmachine-spot-schedule.yaml ` references
48+ ` CapitalMarketsSchedule ` (` nyse-equities ` ) alone (no more AND-composition).
49+ - ` examples/timebasedspotschedule.yaml ` : NEW companion file defining the
50+ ` business-hours ` / ` weekend-only ` (ns ` default ` ) and ` business-hours-toronto `
51+ (ns ` hosted-cluster-alpha ` ) provider objects the SM examples reference.
52+ - ` examples/capitalmarketsschedule.yaml ` , ` examples/workshop/* ` : updated
53+ comments / shape to ` spec.schedule ` reference + ` spec.enabled ` ; workshop now
54+ installs the time-based provider and toggles ` spec.enabled ` / ` tbss ` .
55+ - ` deploy/spot-schedule-providers/time-based/ ` : NEW provider deploy bundle
56+ (serviceaccount / clusterrole / clusterrolebinding / deployment /
57+ kustomization), mirroring the capital-markets bundle — least-privilege RBAC
58+ (get/list/watch ` timebasedspotschedules ` , update/patch its ` /status ` ),
59+ hardened ` Deployment ` running ` spot-schedule-time-based ` .
60+ - ` docs/src/** ` and ` docs/mkdocs.yml ` : rewrote all spot-schedule prose to the
61+ ADR 0009 shape (required ` spec.schedule ` provider ref; ` TimeBasedSpotSchedule `
62+ as the default first-party provider; ` spec.enabled ` master switch; emergency
63+ reclaim sets ` spec.enabled ` ; VAP single group-pin rule 4 / ` v1beta1 ` -only
64+ matchConstraints). Added a new ` docs/src/guides/time-based-schedule.md ` guide
65+ and listed it in the nav.
66+
67+ ### Why
68+ ADR 0009 reified the former inline ` ScheduledMachine.spec.schedule ` window into
69+ the first-party ` TimeBasedSpotSchedule ` provider, made ` spec.schedule ` a required
70+ provider reference, dropped the SM ` v1alpha1 ` version and the ` spotSchedule `
71+ field, and introduced ` spec.enabled ` . Examples, deploy manifests, and docs had
72+ to match the new contract.
73+
74+ ### Impact
75+ - [x] Breaking change (pre-release CRD contract: ` spec.schedule ` is now a
76+ required provider reference, ` spec.spotSchedule ` removed, SM ` v1alpha1 ` dropped)
77+ - [x] Requires cluster rollout (new CRD + provider controller + RBAC; re-apply
78+ ` deploy/crds/ ` and the time-based provider bundle)
79+ - [ ] Config change only
80+ - [ ] Documentation only
81+
82+ ---
83+
84+ ** Author:** Erick Bourgeois
85+
86+ ### Changed
87+ - ` docs/src/guides/create-your-own-provider.md ` : NEW standalone guide — a
88+ complete, copy-pasteable walkthrough building a minimal ` ManualSchedule `
89+ provider end to end: CRD (namespaced, ` status ` subresource), controller
90+ (status-patch reconcile, ` Ready ` semantics, event-driven not polling),
91+ least-privilege RBAC, deployment, referencing from a ` ScheduledMachine ` ,
92+ verification, and additive versioning. Language-agnostic.
93+ - ` docs/mkdocs.yml ` : grouped both provider guides under a ** Spot Schedule
94+ Providers** sub-section in Guides (CapitalMarketsSchedule + Create Your Own
95+ Provider) — makes the existing capital-markets guide more discoverable.
96+ - ` docs/src/reference/spot-schedule-contract.md ` : replaced the inline
97+ "implement your own" walkthrough with a pointer to the new guide (reference =
98+ spec, guide = how-to); added both guides to See-also.
99+ - ` docs/src/guides/capital-markets-schedule.md ` : added a See-also section
100+ cross-linking the concept, contract, and the new provider guide.
101+
102+ ### Why
103+ The "create your own provider" how-to was buried inside the contract * reference*
104+ page; operators asked for it (and the CapitalMarketsSchedule guide) as
105+ first-class entries under ** Guides** . Splitting how-to from spec also keeps the
106+ reference page focused.
107+
108+ ### Impact
109+ - [ ] Breaking change
110+ - [ ] Requires cluster rollout
111+ - [ ] Config change only
112+ - [x] Documentation only
113+
114+ ---
115+
12116## [ 2026-06-15 10:30] - Restore dropped spot-schedule metric functions (build fix)
13117
14118** Author:** Erick Bourgeois
0 commit comments