Skip to main content
Maintenance windows control when automated deployments and updates can occur in your environments and services. Define recurring time intervals when changes are allowed, ensuring updates align with your operational requirements and change management processes.
# business-hours.maintenancewindow.yaml
# yaml-language-server: $schema=https://api.ryvn.app/v1/schemas/resources.json
kind: MaintenanceWindow
metadata:
  name: business-hours
spec:
  timeZone: America/New_York
  intervals:
    - "Mon 09:00 - Mon 17:00"
    - "Tue 09:00 - Tue 17:00"

# production.environment.yaml
kind: Environment
metadata:
  name: production
spec:
  maintenanceWindow: business-hours
  ...

# api.service.yaml
kind: Service
metadata:
  name: api
spec:
  maintenanceWindow: business-hours
  ...

Properties

name

string — required Unique identifier for this maintenance window. Used to reference the window from environments and services.
name: weekday-nights

timeZone

string — required IANA timezone identifier for interpreting all time values in this window. All intervals use this timezone. Common values: America/New_York, America/Los_Angeles, Europe/London, Asia/Tokyo, UTC
timeZone: America/New_York

intervals

array — required List of recurring time intervals when deployments and updates are allowed. Each interval is a string in the format "Day HH:MM - Day HH:MM". Multiple intervals can be defined for different days or times. Format: "Day HH:MM - Day HH:MM"
  • Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun (case insensitive, 3 letters)
  • Time: 24-hour format HH:MM
  • Spaces: Flexible and optional
intervals:
  - "Mon 09:00 - Mon 17:00"
  - "Fri 22:00 - Sat 06:00"

Associating with Environments

To apply a maintenance window to an environment, set the maintenanceWindow property in your environment configuration. All automated deployments and updates for that environment will only occur during the specified intervals.
kind: Environment
metadata:
  name: production
spec:
  maintenanceWindow: business-hours
  ...
See the maintenanceWindow property documentation for your environment type:

Associating with Services

To apply a maintenance window to a service, set the maintenanceWindow property in your service configuration. Automated deployments of that service will only occur during the specified intervals.
kind: Service
metadata:
  name: api
spec:
  maintenanceWindow: weekday-nights
  ...
See the maintenanceWindow property documentation for your service type:

Examples

Business Hours

Allow deployments during weekday business hours:
kind: MaintenanceWindow
metadata:
  name: business-hours
spec:
  timeZone: America/New_York
  intervals:
    - "Mon 09:00 - Mon 17:00"
    - "Tue 09:00 - Tue 17:00"
    - "Wed 09:00 - Wed 17:00"
---
kind: Environment
metadata:
  name: production
spec:
  maintenanceWindow: business-hours
  ...

Overnight Windows

Allow deployments overnight when traffic is low:
kind: MaintenanceWindow
metadata:
  name: overnight
spec:
  timeZone: America/Los_Angeles
  intervals:
    - "Mon 22:00 - Tue 06:00"
    - "Tue 22:00 - Wed 06:00"