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

GKE: Add support to select release channel #330

Merged
merged 1 commit into from
Jan 9, 2024
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
4 changes: 4 additions & 0 deletions google/_modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ resource "google_container_cluster" "current" {

min_master_version = var.min_master_version

release_channel {
channel = var.release_channel
}

remove_default_node_pool = var.remove_default_node_pool
initial_node_count = var.initial_node_count

Expand Down
5 changes: 5 additions & 0 deletions google/_modules/gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ variable "min_master_version" {
description = "Minimum GKE master version."
}

variable "release_channel" {
type = string
description = "The selected release channel. Accepted values are: UNSPECIFIED, RAPID, REGULAR, STABLE"
}

variable "daily_maintenance_window_start_time" {
type = string
description = "Start time of the daily maintenance window."
Expand Down
1 change: 1 addition & 0 deletions google/cluster/configuration.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ locals {
cluster_node_locations = split(",", local.cluster_node_locations_lookup)

cluster_min_master_version = local.cfg["cluster_min_master_version"]
cluster_release_channel = lookup(local.cfg, "cluster_release_channel", "STABLE")

cluster_daily_maintenance_window_start_time = lookup(
local.cfg,
Expand Down
1 change: 1 addition & 0 deletions google/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module "cluster" {
node_locations = local.cluster_node_locations

min_master_version = local.cluster_min_master_version
release_channel = local.cluster_release_channel

daily_maintenance_window_start_time = local.cluster_daily_maintenance_window_start_time

Expand Down