Feature Request: support `customSchedule` (RRULE + timezone) in DatadogMonitor
🚀 Feature Request: support customSchedule (RRULE + timezone) in DatadogMonitor
Background
-
PR #1702 (merged 26 Mar 2025) added
options.schedulingOptions.evaluationWindow— thanks 🎉
This unblocked cumulative windows (hourStarts,dayStarts,monthStarts). -
We still cannot express “cron‑style” one‑shot schedules that the Datadog API and Terraform provider expose via:
custom_schedule {
recurrence {
rrule = "FREQ=DAILY;BYHOUR=22;BYMINUTE=30"
timezone = "Europe/Stockholm"
}
}
Problem statement
Many existing monitors that people use rely on custom_schedule to fire once at a precise local time.
With the Operator we can only approximate this using UTC‑based cumulative windows, which:
- run continuously instead of once,
- break on daylight‑saving‑time shifts,
- cannot model weekly or monthly RRULEs.
Proposal
Add a sibling object to evaluationWindow:
options:
schedulingOptions:
customSchedule: # <— new
recurrence:
rrule: "FREQ=DAILY;BYHOUR=22;BYMINUTE=30"
timezone: "Europe/Stockholm"
This should map 1‑to‑1 to the Datadog REST field scheduling_options.custom_schedule.
Acceptance criteria
- [ ] CRD schema updated (v1alpha1 + versioned conversion where needed).
- [ ] Reconciler sets/patches the monitor with
custom_schedulewhen present. - [ ] Unit + e2e tests for daily & weekly RRULEs in different time‑zones.
- [ ] Documentation & sample manifest.
Environment
| value | |
|---|---|
| Operator ver. | v0.10.0 |
| K8s | v1.29 |
| Datadog region | US / EU |
Reproduction steps
- Apply any manifest containing the
customScheduleblock above. - Operator rejects it with
unknown fieldvalidation error.
Additional context
Terraform resource parity: datadog_monitor.scheduling_options.custom_schedule.
Thanks for considering!
Hi @fanny-jiang, I’ve created a PR to solve this issue, but I don’t have permission to edit labels, which caused the CI jobs to fail.
Could you please add the necessary labels and review at the PR when you have a moment?
Completed in https://github.com/DataDog/datadog-operator/pull/1949, will be released in a few weeks with 1.17.0 release