Implement reconciliation logic for CarbonAwareJob, using kopf
Pseudocode for the reconciliation algorithm should be as follows:
- On CAJob creation / update, find the optimal scheduled time using https://docs.carbonaware.dev/scheduler/ (the Python client) and update the status
- Every minutes (configurable by environment variable, default to 10m), re-evaluate the optimal scheduled time (keeping in mind to adjust the time window as time passes)
- At the optimal time, create a job (and propagate status to the CarbonAwareJob resource)
Implement reconciliation logic for CarbonAwareJob, using kopf
Pseudocode for the reconciliation algorithm should be as follows: