Installing CRDs¶
5-Spot uses Custom Resource Definitions (CRDs) to extend the Kubernetes API.
ScheduledMachine CRD¶
The ScheduledMachine CRD is the primary resource type for 5-Spot.
Installation¶
Or apply the whole directory (also installs the spot-schedule provider CRD below):
Or from the repository:
kubectl apply -f https://raw.githubusercontent.com/finos/5-spot/main/deploy/crds/scheduledmachine.yaml
The ScheduledMachine CRD serves a single version v1beta1 (storage / served;
ADR 0009 removed the former v1alpha1). Its spec.schedule is a required
reference to a spot-schedule provider object in the same namespace.
TimeBasedSpotSchedule CRD (default spot-schedule provider)¶
The default, first-party spot-schedule provider CRD
(timebasedspotschedules.spotschedules.5spot.finos.org, ADR 0009) — the reified
former inline schedule (day / hour / timezone windows). A ScheduledMachine
references it via spec.schedule. Install it (ships in deploy/crds/):
CapitalMarketsSchedule CRD (spot-schedule provider)¶
The reference spot-schedule provider CRD
(capitalmarketsschedules.spotschedules.5spot.finos.org, ADR 0006). Install it
if a ScheduledMachine.spec.schedule references a CapitalMarketsSchedule:
Verify Installation¶
Expected output:
CRD Schema¶
The CRD defines the following structure:
- apiVersion:
5spot.finos.org/v1beta1 - kind:
ScheduledMachine - spec: Configuration for scheduling and machine management
- status: Current state and conditions
See the API Reference for complete field documentation.
Generating CRDs¶
If building from source, generate CRDs using:
This writes deploy/crds/scheduledmachine.yaml,
deploy/crds/capitalmarketsschedule.yaml, and
deploy/crds/timebasedspotschedule.yaml.
Upgrading CRDs¶
When upgrading 5-Spot, update the CRD first:
Caution
CRD changes may affect existing resources. Always review the changelog before upgrading.
Next Steps¶
- Deploying Operator - Deploy the 5-Spot controller
- Quick Start - Create your first ScheduledMachine