Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add timeouts variable for safer cluster module #1613

Merged
merged 5 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,6 @@ module "gke" {
filestore_csi_driver = var.filestore_csi_driver

notification_config_topic = var.notification_config_topic

timeouts = var.timeouts
}
10 changes: 10 additions & 0 deletions autogen/safer-cluster/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,13 @@ variable "notification_config_topic" {
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
default = ""
}

variable "timeouts" {
type = map(string)
description = "Timeout for cluster operations."
default = {}
validation {
condition = !contains([for t in keys(var.timeouts) : contains(["create", "update", "delete"], t)], false)
error_message = "Only create, update, delete timeouts can be specified."
}
}
1 change: 1 addition & 0 deletions modules/safer-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ For simplicity, we suggest using `roles/container.admin` and
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |
| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | `map(list(string))` | `{}` | no |
| subnetwork | The subnetwork to host the cluster in | `string` | n/a | yes |
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
| upstream\_nameservers | If specified, the values replace the nameservers taken by default from the node’s /etc/resolv.conf | `list(string)` | `[]` | no |
| windows\_node\_pools | List of maps containing node pools | `list(map(string))` | `[]` | no |
| zones | The zones to host the cluster in | `list(string)` | `[]` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,6 @@ module "gke" {
filestore_csi_driver = var.filestore_csi_driver

notification_config_topic = var.notification_config_topic

timeouts = var.timeouts
}
10 changes: 10 additions & 0 deletions modules/safer-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,13 @@ variable "notification_config_topic" {
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
default = ""
}

variable "timeouts" {
type = map(string)
description = "Timeout for cluster operations."
default = {}
validation {
condition = !contains([for t in keys(var.timeouts) : contains(["create", "update", "delete"], t)], false)
error_message = "Only create, update, delete timeouts can be specified."
}
}
1 change: 1 addition & 0 deletions modules/safer-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ For simplicity, we suggest using `roles/container.admin` and
| sandbox\_enabled | (Beta) Enable GKE Sandbox (Do not forget to set `image_type` = `COS_CONTAINERD` to use it). | `bool` | `false` | no |
| stub\_domains | Map of stub domains and their resolvers to forward DNS queries for a certain domain to an external DNS server | `map(list(string))` | `{}` | no |
| subnetwork | The subnetwork to host the cluster in | `string` | n/a | yes |
| timeouts | Timeout for cluster operations. | `map(string)` | `{}` | no |
| upstream\_nameservers | If specified, the values replace the nameservers taken by default from the node’s /etc/resolv.conf | `list(string)` | `[]` | no |
| windows\_node\_pools | List of maps containing node pools | `list(map(string))` | `[]` | no |
| zones | The zones to host the cluster in | `list(string)` | `[]` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,6 @@ module "gke" {
filestore_csi_driver = var.filestore_csi_driver

notification_config_topic = var.notification_config_topic

timeouts = var.timeouts
}
10 changes: 10 additions & 0 deletions modules/safer-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,13 @@ variable "notification_config_topic" {
description = "The desired Pub/Sub topic to which notifications will be sent by GKE. Format is projects/{project}/topics/{topic}."
default = ""
}

variable "timeouts" {
type = map(string)
description = "Timeout for cluster operations."
default = {}
validation {
condition = !contains([for t in keys(var.timeouts) : contains(["create", "update", "delete"], t)], false)
error_message = "Only create, update, delete timeouts can be specified."
}
}