diff --git a/README.md b/README.md index f7a1601..be5a957 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ No modules. | [cluster\_secondary\_range\_name](#input\_cluster\_secondary\_range\_name) | VPC Secondary range name for pods | `string` | `""` | no | | [cluster\_subnet\_id](#input\_cluster\_subnet\_id) | Subnetwork name for the cluster. | `string` | n/a | yes | | [control\_plane\_enabled](#input\_control\_plane\_enabled) | Whether control plane is enabled or not | `bool` | `false` | no | -| [control\_plane\_pool\_config](#input\_control\_plane\_pool\_config) | Control plane node pool config |
object({
disk_size_gb = optional(string, "100")
disk_type = optional(string, "pd-balanced")
machine_type = optional(string, "e2-medium")
autoscaling = optional(object({
min_node_count = optional(number, 1)
max_node_count = optional(number, 2)
location_policy = optional(string, "BALANCED")
}), {})
enable_secure_boot = optional(bool, true)
enable_integrity_monitoring = optional(bool, true)
auto_repair = optional(bool, true)
auto_upgrade = optional(bool, true)
workload_metadata_config_mode = optional(string, "GKE_METADATA")
service_account = optional(string, "default")
labels = optional(map(string), {
"class.truefoundry.io/component" = "control-plane"
})
taints = optional(object(
{
key = optional(string, "class.truefoundry.io/component")
value = optional(string, "control-plane")
effect = optional(string, "NO_SCHEDULE")
}
), {})
preemptible = optional(bool, false)
spot = optional(bool, true)
})
| `{}` | no | +| [control\_plane\_pool\_config](#input\_control\_plane\_pool\_config) | Control plane node pool config |
object({
disk_size_gb = optional(string, "100")
disk_type = optional(string, "pd-balanced")
machine_type = optional(string, "e2-medium")
autoscaling = optional(object({
min_node_count = optional(number, 1)
max_node_count = optional(number, 2)
location_policy = optional(string, "BALANCED")
}), {})
enable_secure_boot = optional(bool, true)
enable_integrity_monitoring = optional(bool, true)
auto_repair = optional(bool, true)
auto_upgrade = optional(bool, true)
workload_metadata_config_mode = optional(string, "GKE_METADATA")
service_account = optional(string, "default")
labels = optional(map(string), {
"class.truefoundry.com/component" = "control-plane"
})
taints = optional(object(
{
key = optional(string, "class.truefoundry.com/component")
value = optional(string, "control-plane")
effect = optional(string, "NO_SCHEDULE")
}
), {})
preemptible = optional(bool, false)
spot = optional(bool, true)
})
| `{}` | no | | [deletion\_protection](#input\_deletion\_protection) | Deletion protection enabled/disabled | `bool` | `false` | no | | [enable\_container\_image\_streaming](#input\_enable\_container\_image\_streaming) | Enable/disable container image streaming | `bool` | `true` | no | | [kubernetes\_version](#input\_kubernetes\_version) | Version of GKE | `string` | `"1.28"` | no | diff --git a/gke.tf b/gke.tf index a7a6324..15f43de 100644 --- a/gke.tf +++ b/gke.tf @@ -262,7 +262,7 @@ resource "google_container_node_pool" "control_plane_pool" { # *****************************************/ resource "google_compute_firewall" "fix_webhooks" { # count = var.add_cluster_firewall_rules || var.add_master_webhook_firewall_rules ? 1 : 0 - count = var.use_existing_cluster && var.shared_vpc ? 0 : 1 + count = var.use_existing_cluster || var.shared_vpc ? 0 : 1 name = "${var.cluster_name}-webhook" description = "Allow Nodes access to Control Plane" project = var.project diff --git a/variables.tf b/variables.tf index 026b1e2..92248fe 100644 --- a/variables.tf +++ b/variables.tf @@ -176,11 +176,11 @@ variable "control_plane_pool_config" { workload_metadata_config_mode = optional(string, "GKE_METADATA") service_account = optional(string, "default") labels = optional(map(string), { - "class.truefoundry.io/component" = "control-plane" + "class.truefoundry.com/component" = "control-plane" }) taints = optional(object( { - key = optional(string, "class.truefoundry.io/component") + key = optional(string, "class.truefoundry.com/component") value = optional(string, "control-plane") effect = optional(string, "NO_SCHEDULE") }