Skip to content

feat: add new scaletest infrastructure #15573

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

Merged
merged 24 commits into from
Dec 12, 2024
Prev Previous commit
Next Next commit
fmt
  • Loading branch information
f0ssel committed Dec 9, 2024
commit bbad08e0d43365c27d9a0734f33961c2080f502c
32 changes: 16 additions & 16 deletions scaletest/terraform/action/deployments.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,34 @@ locals {
small = {
coder = {
nodepool_size = 1
machine_type = "t2d-standard-4"
replicas = 1
cpu_request = "1000m"
mem_request = "6Gi"
cpu_limit = "2000m"
mem_limit = "12Gi"
machine_type = "t2d-standard-4"
replicas = 1
cpu_request = "1000m"
mem_request = "6Gi"
cpu_limit = "2000m"
mem_limit = "12Gi"
}
provisionerd = {
replicas = 1
replicas = 1
cpu_request = "100m"
mem_request = "1Gi"
cpu_limit = "1000m"
mem_limit = "1Gi"
cpu_limit = "1000m"
mem_limit = "1Gi"
}
workspaces = {
nodepool_size = 1
machine_type = "t2d-standard-4"
cpu_request = "100m"
mem_request = "128Mi"
cpu_limit = "100m"
mem_limit = "128Mi"
machine_type = "t2d-standard-4"
cpu_request = "100m"
mem_request = "128Mi"
cpu_limit = "100m"
mem_limit = "128Mi"
}
misc = {
nodepool_size = 1
machine_type = "t2d-standard-4"
machine_type = "t2d-standard-4"
}
cloudsql = {
tier = "db-f1-micro"
tier = "db-f1-micro"
max_connections = 500
}
}
Expand Down
10 changes: 5 additions & 5 deletions scaletest/terraform/action/gcp_clusters.tf
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ resource "google_container_cluster" "cluster" {
}

resource "google_container_node_pool" "node_pool" {
for_each = local.node_pools
name = each.value.name
location = local.deployments[each.value.cluster].zone
project = var.project_id
cluster = google_container_cluster.cluster[each.value.cluster].name
for_each = local.node_pools
name = each.value.name
location = local.deployments[each.value.cluster].zone
project = var.project_id
cluster = google_container_cluster.cluster[each.value.cluster].name
node_count = local.scenarios[var.scenario][each.value.name].nodepool_size
node_config {
oauth_scopes = [
Expand Down
2 changes: 2 additions & 0 deletions scaletest/terraform/action/k8s_coder_asia.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resource "kubernetes_namespace" "coder_asia" {
lifecycle {
ignore_changes = [timeouts, wait_for_default_service_account]
}

depends_on = [google_container_node_pool.node_pool["asia_misc"]]
}

resource "kubernetes_secret" "provisionerd_psk_asia" {
Expand Down
2 changes: 2 additions & 0 deletions scaletest/terraform/action/k8s_coder_europe.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resource "kubernetes_namespace" "coder_europe" {
lifecycle {
ignore_changes = [timeouts, wait_for_default_service_account]
}

depends_on = [google_container_node_pool.node_pool["europe_misc"]]
}

resource "kubernetes_secret" "provisionerd_psk_europe" {
Expand Down
2 changes: 2 additions & 0 deletions scaletest/terraform/action/k8s_coder_primary.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ resource "kubernetes_namespace" "coder_primary" {
lifecycle {
ignore_changes = [timeouts, wait_for_default_service_account]
}

depends_on = [google_container_node_pool.node_pool["primary_misc"]]
}

resource "kubernetes_secret" "coder_db" {
Expand Down
2 changes: 1 addition & 1 deletion scaletest/terraform/action/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ variable "name" {
variable "scenario" {
description = "The scenario to deploy"
validation {
condition = contains(["small", "medium", "large"], var.scenario)
condition = contains(["small", "medium", "large"], var.scenario)
error_message = "Scenario must be one of small, medium, or large"
}
}
Expand Down
Loading