Skip to content

Commit d45a38f

Browse files
Add EXTENDED as an option for release_channel in google_container_cluster (#11437) (#19141)
[upstream:413e61dc30baf450b295ac392a3909dfa5e15e51] Signed-off-by: Modular Magician <[email protected]>
1 parent d425fe4 commit d45a38f

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.changelog/11437.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
container: added EXTENDED as a valid option for `release_channel` field in `google_container_cluster` resource
3+
```

google/services/container/resource_container_cluster.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1777,12 +1777,13 @@ func ResourceContainerCluster() *schema.Resource {
17771777
"channel": {
17781778
Type: schema.TypeString,
17791779
Required: true,
1780-
ValidateFunc: validation.StringInSlice([]string{"UNSPECIFIED", "RAPID", "REGULAR", "STABLE"}, false),
1780+
ValidateFunc: validation.StringInSlice([]string{"UNSPECIFIED", "RAPID", "REGULAR", "STABLE", "EXTENDED"}, false),
17811781
Description: `The selected release channel. Accepted values are:
17821782
* UNSPECIFIED: Not set.
17831783
* RAPID: Weekly upgrade cadence; Early testers and developers who requires new features.
17841784
* REGULAR: Multiple per month upgrade cadence; Production users who need features not yet offered in the Stable channel.
1785-
* STABLE: Every few months upgrade cadence; Production users who need stability above all else, and for whom frequent upgrades are too risky.`,
1785+
* STABLE: Every few months upgrade cadence; Production users who need stability above all else, and for whom frequent upgrades are too risky.
1786+
* EXTENDED: GKE provides extended support for Kubernetes minor versions through the Extended channel. With this channel, you can stay on a minor version for up to 24 months.`,
17861787
},
17871788
},
17881789
},

google/services/container/resource_container_cluster_test.go

+21-1
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,26 @@ func TestAccContainerCluster_withReleaseChannelEnabledDefaultVersion(t *testing.
778778
ImportStateVerify: true,
779779
ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
780780
},
781+
{
782+
Config: testAccContainerCluster_withReleaseChannelEnabledDefaultVersion(clusterName, "EXTENDED", networkName, subnetworkName),
783+
},
784+
{
785+
ResourceName: "google_container_cluster.with_release_channel",
786+
ImportStateIdPrefix: "us-central1-a/",
787+
ImportState: true,
788+
ImportStateVerify: true,
789+
ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
790+
},
791+
{
792+
Config: testAccContainerCluster_withReleaseChannelEnabled(clusterName, "EXTENDED", networkName, subnetworkName),
793+
},
794+
{
795+
ResourceName: "google_container_cluster.with_release_channel",
796+
ImportStateIdPrefix: "us-central1-a/",
797+
ImportState: true,
798+
ImportStateVerify: true,
799+
ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
800+
},
781801
{
782802
Config: testAccContainerCluster_withReleaseChannelEnabled(clusterName, "UNSPECIFIED", networkName, subnetworkName),
783803
},
@@ -807,7 +827,7 @@ func TestAccContainerCluster_withInvalidReleaseChannel(t *testing.T) {
807827
Steps: []resource.TestStep{
808828
{
809829
Config: testAccContainerCluster_withReleaseChannelEnabled(clusterName, "CANARY", networkName, subnetworkName),
810-
ExpectError: regexp.MustCompile(`expected release_channel\.0\.channel to be one of \["?UNSPECIFIED"? "?RAPID"? "?REGULAR"? "?STABLE"?\], got CANARY`),
830+
ExpectError: regexp.MustCompile(`expected release_channel\.0\.channel to be one of \["?UNSPECIFIED"? "?RAPID"? "?REGULAR"? "?STABLE"? "?EXTENDED"?\], got CANARY`),
811831
},
812832
},
813833
})

website/docs/r/container_cluster.html.markdown

+1
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,7 @@ not.
12111211
* RAPID: Weekly upgrade cadence; Early testers and developers who requires new features.
12121212
* REGULAR: Multiple per month upgrade cadence; Production users who need features not yet offered in the Stable channel.
12131213
* STABLE: Every few months upgrade cadence; Production users who need stability above all else, and for whom frequent upgrades are too risky.
1214+
* EXTENDED: GKE provides extended support for Kubernetes minor versions through the Extended channel. With this channel, you can stay on a minor version for up to 24 months.
12141215

12151216
<a name="nested_cost_management_config"></a>The `cost_management_config` block supports:
12161217

0 commit comments

Comments
 (0)