Skip to content

Commit

Permalink
feat: Add maintenance variables for safer cluster (#1282)
Browse files Browse the repository at this point in the history
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
  • Loading branch information
christiangonre and bharathkkb committed Jun 21, 2022
1 parent c7c9f44 commit 19f59c4
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autogen/safer-cluster/main.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ module "gke" {
datapath_provider = var.datapath_provider

maintenance_start_time = var.maintenance_start_time
maintenance_end_time = var.maintenance_end_time
maintenance_recurrence = var.maintenance_recurrence
maintenance_exclusions = var.maintenance_exclusions

// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
Expand Down
18 changes: 18 additions & 0 deletions autogen/safer-cluster/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ variable "maintenance_start_time" {
default = "05:00"
}

variable "maintenance_exclusions" {
type = list(object({ name = string, start_time = string, end_time = string }))
description = "List of maintenance exclusions. A cluster can have up to three"
default = []
}

variable "maintenance_end_time" {
type = string
description = "Time window specified for recurring maintenance operations in RFC3339 format"
default = ""
}

variable "maintenance_recurrence" {
type = string
description = "Frequency of the recurring maintenance window in RFC5545 format."
default = ""
}

variable "ip_range_pods" {
type = string
description = "The _name_ of the secondary subnet ip range to use for pods"
Expand Down
3 changes: 3 additions & 0 deletions modules/safer-cluster-update-variant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ For simplicity, we suggest using `roles/container.admin` and
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. The module enforces certain minimum versions to ensure that specific features are available. | `string` | `null` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
| maintenance\_exclusions | List of maintenance exclusions. A cluster can have up to three | `list(object({ name = string, start_time = string, end_time = string }))` | `[]` | no |
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
Expand Down
3 changes: 3 additions & 0 deletions modules/safer-cluster-update-variant/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ module "gke" {
datapath_provider = var.datapath_provider

maintenance_start_time = var.maintenance_start_time
maintenance_end_time = var.maintenance_end_time
maintenance_recurrence = var.maintenance_recurrence
maintenance_exclusions = var.maintenance_exclusions

// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
Expand Down
18 changes: 18 additions & 0 deletions modules/safer-cluster-update-variant/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ variable "maintenance_start_time" {
default = "05:00"
}

variable "maintenance_exclusions" {
type = list(object({ name = string, start_time = string, end_time = string }))
description = "List of maintenance exclusions. A cluster can have up to three"
default = []
}

variable "maintenance_end_time" {
type = string
description = "Time window specified for recurring maintenance operations in RFC3339 format"
default = ""
}

variable "maintenance_recurrence" {
type = string
description = "Frequency of the recurring maintenance window in RFC5545 format."
default = ""
}

variable "ip_range_pods" {
type = string
description = "The _name_ of the secondary subnet ip range to use for pods"
Expand Down
3 changes: 3 additions & 0 deletions modules/safer-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ For simplicity, we suggest using `roles/container.admin` and
| istio\_auth | (Beta) The authentication type between services in Istio. | `string` | `"AUTH_MUTUAL_TLS"` | no |
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. The module enforces certain minimum versions to ensure that specific features are available. | `string` | `null` | no |
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | `string` | `"logging.googleapis.com/kubernetes"` | no |
| maintenance\_end\_time | Time window specified for recurring maintenance operations in RFC3339 format | `string` | `""` | no |
| maintenance\_exclusions | List of maintenance exclusions. A cluster can have up to three | `list(object({ name = string, start_time = string, end_time = string }))` | `[]` | no |
| maintenance\_recurrence | Frequency of the recurring maintenance window in RFC5545 format. | `string` | `""` | no |
| maintenance\_start\_time | Time window specified for daily maintenance operations in RFC3339 format | `string` | `"05:00"` | no |
| master\_authorized\_networks | List of master authorized networks. If none are provided, disallow external access (except the cluster node IPs, which GKE automatically whitelists). | `list(object({ cidr_block = string, display_name = string }))` | `[]` | no |
| master\_ipv4\_cidr\_block | The IP range in CIDR notation to use for the hosted master network | `string` | `"10.0.0.0/28"` | no |
Expand Down
3 changes: 3 additions & 0 deletions modules/safer-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ module "gke" {
datapath_provider = var.datapath_provider

maintenance_start_time = var.maintenance_start_time
maintenance_end_time = var.maintenance_end_time
maintenance_recurrence = var.maintenance_recurrence
maintenance_exclusions = var.maintenance_exclusions

// We suggest removing the default node pool, as it cannot be modified without
// destroying the cluster.
Expand Down
18 changes: 18 additions & 0 deletions modules/safer-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,24 @@ variable "maintenance_start_time" {
default = "05:00"
}

variable "maintenance_exclusions" {
type = list(object({ name = string, start_time = string, end_time = string }))
description = "List of maintenance exclusions. A cluster can have up to three"
default = []
}

variable "maintenance_end_time" {
type = string
description = "Time window specified for recurring maintenance operations in RFC3339 format"
default = ""
}

variable "maintenance_recurrence" {
type = string
description = "Frequency of the recurring maintenance window in RFC5545 format."
default = ""
}

variable "ip_range_pods" {
type = string
description = "The _name_ of the secondary subnet ip range to use for pods"
Expand Down

0 comments on commit 19f59c4

Please sign in to comment.