Skip to content

feat: add autoscaling configuration for prebuilds #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evgeniy-scherbina
Copy link

@evgeniy-scherbina evgeniy-scherbina commented May 29, 2025

Relates to coder/internal#312

Exposes an autoscaling field under coder_workspace_preset:

data "coder_workspace_preset" "us-nix" {
  ...
  
  prebuilds = {
	  instances = 0                  # default to 0 instances
	  
	  autoscaling {
		  timezone = "UTC"             # only a single timezone may be used for simplicity
		  
		  # scale to 3 instances during the work week
		  schedule {
		    cron = "* 8-18 * * 1-5"    # from 8AM-6:59PM, Mon-Fri, UTC
		    instances = 3              # scale to 3 instances
		  }
		  
		  # scale to 1 instance on Saturdays for urgent support queries
		  schedule {
		    cron = "* 8-14 * * 6"      # from 8AM-2:59PM, Sat, UTC
		    instances = 1              # scale to 1 instance
		  }
	  }
  }
}

@evgeniy-scherbina evgeniy-scherbina force-pushed the prebuilds-autoscaling-mechanism branch from 15cae29 to 543a735 Compare June 11, 2025 17:35
@evgeniy-scherbina evgeniy-scherbina force-pushed the prebuilds-autoscaling-mechanism branch from 2f82387 to d61894d Compare June 11, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant