Skip to content

Commit 54996d7

Browse files
[CI] Expose linux and windows machine types through gke_cluster
This enables using different instance types for different clusters where we might have different quota. Reviewers: dschuff, lnihlen, Keenuts, cmtice, gburgessiv Reviewed By: lnihlen Pull Request: #444
1 parent 607a23d commit 54996d7

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

premerge/gke_cluster/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ resource "google_container_node_pool" "llvm_premerge_linux" {
3737
}
3838

3939
node_config {
40-
machine_type = "n2-standard-64"
40+
machine_type = var.linux_machine_type
4141
taint {
4242
key = "premerge-platform"
4343
value = "linux"
@@ -71,7 +71,7 @@ resource "google_container_node_pool" "llvm_premerge_windows" {
7171
# We do not set a taint for the windows nodes as kubernetes by default sets
7272
# a node.kubernetes.io/os taint for windows nodes.
7373
node_config {
74-
machine_type = "n2-standard-32"
74+
machine_type = var.windows_machine_type
7575
labels = {
7676
"premerge-platform" : "windows"
7777
}

premerge/gke_cluster/variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,13 @@ variable "region" {
77
description = "The region to run the cluster in"
88
type = string
99
}
10+
11+
variable "linux_machine_type" {
12+
description = "The type of machine to use for Linux instances"
13+
type = string
14+
}
15+
16+
variable "windows_machine_type" {
17+
description = "The type of machine to use for Windows instances"
18+
type = string
19+
}

premerge/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ module "premerge_cluster_us_central" {
4949
source = "./gke_cluster"
5050
cluster_name = "llvm-premerge-prototype"
5151
region = "us-central1-a"
52+
linux_machine_type = "n2-standard-64"
53+
windows_machine_type = "n2-standard-32"
5254
}
5355

5456
# TODO(boomanaiden154): Remove these statements after the changes have been

0 commit comments

Comments
 (0)