Skip to content

Commit

Permalink
Allow specifying GKE's system node pool disk properties
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitkinra committed Nov 15, 2024
1 parent 3f66bf0 commit f7c03ea
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/scheduler/gke-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ limitations under the License.
| <a name="input_service_account_scopes"></a> [service\_account\_scopes](#input\_service\_account\_scopes) | Scopes to to use with the system node pool. | `set(string)` | <pre>[<br/> "https://www.googleapis.com/auth/cloud-platform"<br/>]</pre> | no |
| <a name="input_services_ip_range_name"></a> [services\_ip\_range\_name](#input\_services\_ip\_range\_name) | The name of the secondary subnet range to use for services. | `string` | `"services"` | no |
| <a name="input_subnetwork_self_link"></a> [subnetwork\_self\_link](#input\_subnetwork\_self\_link) | The self link of the subnetwork to host the cluster in. | `string` | n/a | yes |
| <a name="input_system_node_pool_disk_size_gb"></a> [system\_node\_pool\_disk\_size\_gb](#input\_system\_node\_pool\_disk\_size\_gb) | Size of disk for each node of the system node pool. | `number` | `100` | no |
| <a name="input_system_node_pool_disk_type"></a> [system\_node\_pool\_disk\_type](#input\_system\_node\_pool\_disk\_type) | Disk type for each node of the system node pool. | `string` | `null` | no |
| <a name="input_system_node_pool_enable_secure_boot"></a> [system\_node\_pool\_enable\_secure\_boot](#input\_system\_node\_pool\_enable\_secure\_boot) | Enable secure boot for the nodes. Keep enabled unless custom kernel modules need to be loaded. See [here](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) for more info. | `bool` | `true` | no |
| <a name="input_system_node_pool_enabled"></a> [system\_node\_pool\_enabled](#input\_system\_node\_pool\_enabled) | Create a system node pool. | `bool` | `true` | no |
| <a name="input_system_node_pool_image_type"></a> [system\_node\_pool\_image\_type](#input\_system\_node\_pool\_image\_type) | The default image type used by NAP once a new node pool is being created. Use either COS\_CONTAINERD or UBUNTU\_CONTAINERD. | `string` | `"COS_CONTAINERD"` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/scheduler/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ resource "google_container_node_pool" "system_node_pools" {
service_account = var.service_account_email
oauth_scopes = var.service_account_scopes
machine_type = var.system_node_pool_machine_type
disk_size_gb = var.system_node_pool_disk_size_gb
disk_type = var.system_node_pool_disk_type

dynamic "taint" {
for_each = var.system_node_pool_taints
Expand Down
12 changes: 12 additions & 0 deletions modules/scheduler/gke-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,18 @@ variable "system_node_pool_machine_type" {
default = "e2-standard-4"
}

variable "system_node_pool_disk_size_gb" {
description = "Size of disk for each node of the system node pool."
type = number
default = 100
}

variable "system_node_pool_disk_type" {
description = "Disk type for each node of the system node pool."
type = string
default = null
}

variable "system_node_pool_taints" {
description = "Taints to be applied to the system node pool."
type = list(object({
Expand Down

0 comments on commit f7c03ea

Please sign in to comment.