Skip to content

Commit

Permalink
fix: prevent conflicting GKE CIDR in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
gtsorbo committed Sep 23, 2024
1 parent 957ea58 commit 9cc9716
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/gh-runner-gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ This example shows how to deploy Self Hosted Runners on GKE that supports Docker
| ip\_range\_services\_cider | The secondary ip range cidr to use for services | `string` | `"192.168.64.0/18"` | no |
| ip\_range\_services\_name | The secondary ip range to use for services | `string` | `"ip-range-scv"` | no |
| machine\_type | Machine type for runner node pool | `string` | `"n1-standard-4"` | no |
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network of the GKE cluster. | `string` | `"10.1.0.0/28"` | no |
| max\_node\_count | Maximum number of nodes in the runner node pool | `number` | `4` | no |
| min\_node\_count | Minimum number of nodes in the runner node pool | `number` | `2` | no |
| network\_name | Name for the VPC network | `string` | `"runner-network"` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/gh-runner-gke/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module "runner-cluster" {
zones = var.zones
enable_private_endpoint = var.enable_private_endpoint
enable_private_nodes = var.enable_private_nodes
master_ipv4_cidr_block = var.master_ipv4_cidr_block
network = local.network_name
network_project_id = var.subnetwork_project != "" ? var.subnetwork_project : var.project_id
subnetwork = local.subnet_name
Expand Down
6 changes: 6 additions & 0 deletions modules/gh-runner-gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,9 @@ variable "enable_private_nodes" {
type = bool
default = false
}

variable "master_ipv4_cidr_block" {
description = "The IP range in CIDR notation to use for the hosted master network of the GKE cluster."
type = string
default = "10.1.0.0/28"
}

0 comments on commit 9cc9716

Please sign in to comment.