Skip to content

Commit

Permalink
Merge pull request #330 from kbst/gke-release-channels
Browse files Browse the repository at this point in the history
GKE: Add support to select release channel
  • Loading branch information
pst authored Jan 9, 2024
2 parents 65f999e + 9067834 commit 524477e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
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

0 comments on commit 524477e

Please sign in to comment.