Skip to content

Commit 0b830ce

Browse files
feat: custom disk size and type for GKE runner nodes
1 parent 5e1fdc0 commit 0b830ce

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

modules/gh-runner-gke/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ This example shows how to deploy Self Hosted Runners on GKE that supports Docker
8585
| arc\_systems\_namespace | Namespace created for the ARC operator pods. | `string` | `"arc-systems"` | no |
8686
| cluster\_suffix | Name of the GitHub organization associated with this runner cluster. | `string` | `"arc"` | no |
8787
| create\_network | When set to true, VPC will be auto created | `bool` | `true` | no |
88+
| disk\_size\_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | `number` | `100` | no |
89+
| disk\_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | `string` | `"pd-standard"` | no |
8890
| enable\_private\_nodes | Whether nodes have internal IP addresses only. | `bool` | `false` | no |
8991
| gh\_app\_id | After creating the GitHub App, on the GitHub App's page, note the value for "App ID". | `string` | n/a | yes |
9092
| gh\_app\_installation\_id | You can find the app installation ID on the app installation page, which has the following URL format: `https://github.com/organizations/ORGANIZATION/settings/installations/INSTALLATION_ID` | `string` | n/a | yes |
@@ -121,4 +123,4 @@ This example shows how to deploy Self Hosted Runners on GKE that supports Docker
121123
| service\_account | The default service account used for running nodes. |
122124
| subnet\_name | Name of VPC |
123125
124-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
126+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

modules/gh-runner-gke/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ module "runner-cluster" {
7777
machine_type = var.machine_type
7878
enable_private_nodes = var.enable_private_nodes
7979
spot = var.spot
80+
disk_size_gb = var.disk_size_gb
81+
disk_type = var.disk_type
8082
}
8183
]
8284
}

modules/gh-runner-gke/metadata.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ spec:
5050
type: bool
5151
default: true
5252
required: false
53+
- name: disk_size_gb
54+
description: Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB
55+
type: number
56+
default: 100
57+
required: false
58+
- name: disk_type
59+
description: Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd')
60+
type: string
61+
default: pd-standard
62+
required: false
5363
- name: gh_token
5464
description: Github token that is used for generating Self Hosted Runner Token
5565
type: string
@@ -172,4 +182,4 @@ spec:
172182
- storage-api.googleapis.com
173183
- iam.googleapis.com
174184
- container.googleapis.com
175-
- serviceusage.googleapis.com
185+
- serviceusage.googleapis.com

modules/gh-runner-gke/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,15 @@ variable "spot" {
195195
description = "A boolean that represents whether the underlying node VMs are spot"
196196
default = false
197197
}
198+
199+
variable "disk_size_gb" {
200+
type = number
201+
description = "Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB"
202+
default = 100
203+
}
204+
205+
variable "disk_type" {
206+
type = string
207+
description = "Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd')"
208+
default = "pd-standard"
209+
}

0 commit comments

Comments
 (0)