Skip to content

Commit 7944d32

Browse files
authored
Merge pull request #165 from sassoftware/staging
4.3.0 - March 16, 2023
2 parents 6d191cf + 5e600d2 commit 7944d32

10 files changed

+95
-53
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG GCP_CLI_VERSION=409.0.0
33
FROM hashicorp/terraform:$TERRAFORM_VERSION as terraform
44

55
FROM google/cloud-sdk:$GCP_CLI_VERSION
6-
ARG KUBECTL_VERSION=1.23.8
6+
ARG KUBECTL_VERSION=1.24.10
77

88
WORKDIR /viya4-iac-gcp
99

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Operational knowledge of
3232
- Terraform or Docker
3333
- #### Terraform
3434
- [Terraform](https://www.terraform.io/downloads.html) - v1.0.0
35-
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.23.8
35+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl) - v1.24.10
3636
- [jq](https://stedolan.github.io/jq/) - v1.6
3737
- [gcloud CLI](https://cloud.google.com/sdk/gcloud) - (optional - useful as an alternative to the Google Cloud Platform Portal) - v409.0.0
3838
- #### Docker

config/sample-input-tf-enterprise.tfvars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# NOTE: For Terraform Cloud/Enterprise these variables should be defined
99
# in the workspace in terraform cloud/enterprise as a terraform variable
1010
#
11-
# You also need to define: GOOGLE_CREDENTIALS as an envrionment
11+
# You also need to define: GOOGLE_CREDENTIALS as an environment
1212
# variable.
1313
# prefix = "<prefix-value>"
1414
# location = "<gcp-zone-or-region>" # e.g., "us-east1-b"
@@ -38,7 +38,7 @@ create_static_kubeconfig = true
3838
# tags = {} # e.g., { "key1" = "value1", "key2" = "value2" }
3939

4040
# GKE config
41-
kubernetes_version = "1.23.8-gke.1900"
41+
kubernetes_version = "1.24"
4242
default_nodepool_min_nodes = 1
4343
default_nodepool_vm_type = "n2-standard-2"
4444

docs/user/KubernetesVersions.md

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,76 @@ export LOCATION="us-east1-b"
3131
gcloud container get-server-config --format "yaml(validMasterVersions)" --zone $LOCATION
3232
Fetching server config for us-east1-b
3333
validMasterVersions:
34-
- 1.18.16-gke.1200
35-
- 1.18.16-gke.500
36-
- 1.18.16-gke.302
37-
- 1.18.16-gke.300
38-
- 1.18.15-gke.1502
39-
- 1.18.15-gke.1501
40-
- 1.18.15-gke.1500
41-
- 1.18.15-gke.1102
42-
- 1.18.15-gke.1100
43-
- 1.18.14-gke.1600
44-
- 1.18.14-gke.1200
45-
- 1.18.12-gke.1210
46-
- 1.17.17-gke.3700
47-
- 1.17.17-gke.3000
48-
- 1.17.17-gke.2800
49-
- 1.17.17-gke.1500
50-
- 1.17.17-gke.1101
51-
- 1.17.17-gke.1100
52-
- 1.17.15-gke.800
53-
- 1.16.15-gke.12500
54-
- 1.16.15-gke.11800
55-
- 1.16.15-gke.10600
56-
- 1.16.15-gke.7801
57-
- 1.15.12-gke.6002
34+
- 1.25.6-gke.1000
35+
- 1.25.6-gke.200
36+
- 1.25.5-gke.2000
37+
- 1.24.9-gke.3200
38+
- 1.24.9-gke.2000
39+
- 1.24.9-gke.1500
40+
- 1.24.8-gke.2000
41+
- 1.23.16-gke.1100
42+
- 1.23.16-gke.200
43+
- 1.23.15-gke.1900
44+
- 1.23.15-gke.1400
45+
- 1.23.14-gke.1800
46+
- 1.23.14-gke.401
47+
- 1.23.13-gke.900
48+
- 1.22.17-gke.4000
49+
- 1.22.17-gke.3100
50+
- 1.22.16-gke.2000
51+
- 1.22.16-gke.1300
52+
- 1.22.15-gke.2500
53+
- 1.22.15-gke.1000
54+
- 1.21.14-gke.15800
55+
- 1.21.14-gke.14600
56+
- 1.21.14-gke.14100
57+
- 1.21.14-gke.8500
58+
- 1.21.14-gke.7100
5859
```
5960

6061
**NOTE**: This value will also be the value applied to the compute nodes of your custer.
6162

62-
From here you would take one of these values and set the `kubernets_version` variable in your tfvars files like this:
63+
To set the exact version for your cluster, you would take one of these values and set the `kubernetes_version` variable in your tfvars files like so:
6364

64-
```bash
65-
kubernetes_version = "1.18.15-gke.1102"
65+
```terraform
66+
kubernetes_version = "1.24.9-gke.3200"
6667
```
6768

6869
Do not set the `kubernetes_channel` variable.
6970

7071
**NOTE**: If you find that the version you would like to use in your kubernetes cluster is not listed, you will need to go the [Channel Based](#channel-based) section to find the desired version.
7172

73+
### Aliased Versions
74+
75+
Only applicable in the "version based" scenario (omitting `kubernetes_channel` or setting it to "UNSPECIFIED"), Google supports the use of [aliased versions](https://cloud.google.com/kubernetes-engine/versioning#specifying_cluster_version) when creating your kubernetes cluster. The format required looks like:
76+
77+
* 1.X
78+
* Specifies the highest valid patch+gke.N patch release in the 1.X minor version
79+
* 1.X.Y
80+
* Specifies the highest valid gke.N patch in the 1.X.Y patch release.
81+
82+
83+
**Example: 1.X Format**
84+
85+
In your tfvars you would set the `kubernetes_version` variable in like so:
86+
87+
```terraform
88+
kubernetes_version = "1.24"
89+
```
90+
91+
Going by the list of versions from the output of the `gcloud container get-server-config` command above, this assignment results in a cluster being created with the version `1.24.9-gke.3200`, since Google chooses the "highest valid patch+gke.N patch release in the 1.24 minor version"
92+
93+
**Example: 1.X.Y Format**
94+
95+
In your tfvars you would set the `kubernetes_version` variable in like so:
96+
97+
```terraform
98+
kubernetes_version = "1.23.15"
99+
```
100+
101+
Going by the list of versions from the output of the `gcloud container get-server-config` command above, this assignment results in a cluster being created with the version `1.23.15-gke.1900`, since Google chooses the "highest valid gke.N patch in the 1.23.15 patch release."
102+
103+
72104
## Channel Based
73105

74106
Setting a specific channel for your kubernetes cluster will use the `defaultVersion` provided by that channel. This is the only way to work with a version of kubernetes that has been recently released and/or is not listed in the [Version Based](#version-based) section.
@@ -90,33 +122,43 @@ gcloud container get-server-config --format "yaml(channels)" --zone $LOCATION
90122
Fetching server config for us-east1-b
91123
channels:
92124
- channel: RAPID
93-
defaultVersion: 1.19.8-gke.1000
125+
defaultVersion: 1.25.6-gke.200
94126
validVersions:
95-
- 1.20.4-gke.1800
96-
- 1.19.8-gke.1600
97-
- 1.19.8-gke.1000
127+
- 1.26.1-gke.200
128+
- 1.25.6-gke.1000
129+
- 1.25.6-gke.200
130+
- 1.24.9-gke.3200
131+
- 1.23.16-gke.1100
132+
- 1.23.16-gke.200
133+
- 1.22.17-gke.4000
134+
- 1.22.17-gke.3100
135+
- 1.21.14-gke.15800
98136
- channel: REGULAR
99-
defaultVersion: 1.18.15-gke.1501
137+
defaultVersion: 1.24.9-gke.2000
100138
validVersions:
101-
- 1.18.16-gke.302
102-
- 1.18.15-gke.1502
103-
- 1.18.15-gke.1501
139+
- 1.25.5-gke.2000
140+
- 1.24.9-gke.2000
141+
- 1.23.14-gke.1800
142+
- 1.22.16-gke.2000
143+
- 1.21.14-gke.14600
104144
- channel: STABLE
105-
defaultVersion: 1.17.17-gke.1101
145+
defaultVersion: 1.23.14-gke.1800
106146
validVersions:
107-
- 1.17.17-gke.2800
108-
- 1.17.17-gke.1101
109-
- 1.16.15-gke.7801
147+
- 1.24.9-gke.1500
148+
- 1.23.14-gke.1800
149+
- 1.22.16-gke.2000
150+
- 1.21.14-gke.14600
151+
- 1.21.14-gke.14100
110152
```
111153

112-
From this example output if you are looking to create a kubernetes cluster with v1.19 then you would choose the 'RAPID' channel.
154+
From this example output if you are looking to create a kubernetes cluster with v1.25 then you would choose the 'RAPID' channel.
113155

114156
From here you would set the `kubernetes_channel` variable in your tfvars files like this:
115157

116-
```bash
158+
```terraform
117159
kubernetes_channel = "RAPID"
118160
```
119161

120-
This assignment results in a cluster being created with the version: `1.19.8-gke.1000` for this example.
162+
This assignment results in a cluster being created with the version: `1.25.6-gke.200` for this example.
121163

122164
Do not set the `kubernetes_version` variable.

examples/sample-input-byo.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ postgres_servers = {
3737
}
3838

3939
# GKE config
40-
kubernetes_version = "1.23.14-gke.401"
40+
kubernetes_version = "1.24"
4141
default_nodepool_min_nodes = 2
4242
default_nodepool_vm_type = "e2-standard-8"
4343

examples/sample-input-connect.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ postgres_servers = {
2727
}
2828

2929
# GKE config
30-
kubernetes_version = "1.23.14-gke.401"
30+
kubernetes_version = "1.24"
3131
default_nodepool_min_nodes = 2
3232
default_nodepool_vm_type = "e2-standard-8"
3333

examples/sample-input-ha.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ postgres_servers = {
2727
}
2828

2929
# GKE config
30-
kubernetes_version = "1.23.14-gke.401"
30+
kubernetes_version = "1.24"
3131
default_nodepool_min_nodes = 2
3232
default_nodepool_vm_type = "e2-standard-8"
3333

examples/sample-input-minimal.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tags = {} # e.g., { "key1" = "value1", "key2" = "value2" }
2727
# }
2828

2929
# GKE config
30-
kubernetes_version = "1.23.14-gke.401"
30+
kubernetes_version = "1.24"
3131
default_nodepool_min_nodes = 1
3232
default_nodepool_vm_type = "n2-standard-2"
3333

examples/sample-input.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ postgres_servers = {
2727
}
2828

2929
# GKE config
30-
kubernetes_version = "1.23.14-gke.401"
30+
kubernetes_version = "1.24"
3131
default_nodepool_min_nodes = 2
3232
default_nodepool_vm_type = "e2-standard-8"
3333

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ variable "kubernetes_version" {
5454
default = "latest"
5555

5656
validation {
57-
condition = (can(regex("^\\d.\\d+.\\d+-gke.\\d+$", var.kubernetes_version)) || var.kubernetes_version == "latest")
58-
error_message = "The format for kubernetes version is: x.yy-gke.zzzz or 'latest'."
57+
condition = (can(regex("^\\d.\\d+.\\d+-gke.\\d+$", var.kubernetes_version)) || var.kubernetes_version == "latest" || can(regex("^\\d.\\d+$", var.kubernetes_version)) || can(regex("^\\d.\\d+.\\d+$", var.kubernetes_version)))
58+
error_message = "The format for kubernetes version is: major.minor.patch-gke.N, major.minor, major.minor.patch, or 'latest'."
5959
}
6060
}
6161

0 commit comments

Comments
 (0)