Overview
Why Use Deployment Windows?
Deployment windows help you:- Reduce risk - Only deploy during business hours when teams are available
- Coordinate operations - Block deployments during maintenance windows
- Meet compliance - Enforce change control windows required by regulations
- Protect stability - Prevent deployments during high-traffic periods
Configuration
- Terraform
- API
Properties
If
true, deployments are only allowed during the window. If false,
deployments are blocked during the window (deny window).Understanding rrules
RFC 5545 recurrence rules define repeating patterns. Common components:Example rrules
Window Types
Allow Windows
WhenallowWindow: true (default), deployments are only allowed during the
defined window:
- Terraform
- API
Deny Windows (Blackouts)
WhenallowWindow: false, deployments are blocked during the defined
window:
- Terraform
- API
Common Patterns
Business Hours Only
Allow deployments only during business hours:Maintenance Window Blackout
Block deployments during scheduled maintenance:Weekend Freeze
Prevent deployments over weekends:Late Night Deployments Only
For services that require off-peak deployments:Combined with Other Rules
Use deployment windows alongside other policy rules:- Terraform
- API
Behavior Details
First Deployment Exemption
If a release target has never had a deployment before, deployment window rules are bypassed. This ensures that initial deployments are not blocked by window restrictions.Window Evaluation
- Deployments are evaluated against the current time
- If outside an allow window (or inside a deny window), the deployment waits
- Ctrlplane automatically re-evaluates when the window state changes, using the
computed
nextEvaluationTime
Gradual Rollout Integration
When combined with gradual rollout rules:- Allow windows: Rollout start time is adjusted to the next window opening
- Deny windows: Individual deployments within a rollout respect the deny period
Timezone Handling
- Always specify a timezone for predictable behavior
- If omitted, UTC is used
- Use IANA timezone names (e.g., “America/New_York”, “Europe/London”)
Best Practices
Environment-Based Windows
Recommendations
- ✅ Use timezones matching your operational team’s location
- ✅ Account for holidays with deny windows
- ✅ Provide adequate window duration for rollouts to complete
- ✅ Combine with approval rules for additional oversight
- ✅ Test rrule patterns in staging before production
- ❌ Don’t create windows too narrow for deployments to complete
- ❌ Don’t forget to account for gradual rollout duration
Next Steps
- Policies Overview - Learn about policy structure
- Gradual Rollouts - Control deployment pace
- Approval - Add human approval gates