Skip to content

Commit 3795372

Browse files
authored
In place upgrades version update instructions (#4064)
* Adds instructions for upgrading Kubernetes version of Upgrade test clusters * Updates .md file formatting * Adds sed command to update the Golang version for upgrade test Dockerfiles * Adds pre- and post- Agones release instructions for updating upgrade test versions
1 parent 3c5b7df commit 3795372

File tree

4 files changed

+138
-66
lines changed

4 files changed

+138
-66
lines changed

.github/ISSUE_TEMPLATE/golang_version_upgrade.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ assignees: ''
99

1010

1111
Steps to upgrade Golang version:
12-
- [ ] Update `go.mod` and `go.sum`. At the root of the directory, run:
12+
- [ ] Update `go.mod` and `go.sum`. At the root (agones) directory, run:
1313
- [ ] `find . -name 'go.mod' -not -path '*/\.*' -execdir go mod edit -go=<NEW_GOLANG_VERSION_WITHOUT_PATCH> \;`
1414
- [ ] `find . -name 'go.mod' -not -path '*/\.*' -execdir go mod tidy \;`
1515

16-
- [ ] Update the Dockerfiles for `build` directory.
17-
18-
- [ ] At the root of the directory, run: `find build -type f \( -not -path '*/\.*' -and -not -path 'build/tmp/*' \) -exec sed -i 's/GO_VERSION=[0-9]\+\.[0-9]\+\.[0-9]\+/GO_VERSION=<NEW_GOLANG_VERSION>/g' {} \;`
16+
- [ ] Update the Dockerfiles for `build` directory.
17+
- [ ] At the root directory, run: `find build -type f \( -not -path '*/\.*' -and -not -path 'build/tmp/*' \) -exec sed -i 's/GO_VERSION=[0-9]\+\.[0-9]\+\.[0-9]\+/GO_VERSION=<NEW_GOLANG_VERSION>/g' {} \;`
1918
- [ ] Update the `golang` version for file `build/agones-bot/Dockerfile` to <NEW_GOLANG_VERSION_WITHOUT_PATCH>
20-
21-
- [ ] Update the Dockerfiles for `examples` directory. At the root of the directory, run:
19+
20+
- [ ] Update the Dockerfiles for `test` directory.
21+
- [ ] At the root directory, run: `find test -type f -exec sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:<NEW_GOLANG_VERSION>/g' {} \;`
22+
- [ ] At the root directory, run: `find test -type f -exec sed -i 's/go [0-9]\+\.[0-9]\+\.[0-9]\+/go <NEW_GOLANG_VERSION>/g' {} \;`
23+
- [ ] At the root directory, run: `find test -type f -name 'go.mod' -execdir go mod tidy \;`
24+
25+
- [ ] Update the Dockerfiles for `examples` directory. At the root directory, run:
2226
- [ ] `find examples -name Dockerfile -exec sed -i 's/golang:[0-9]\+\.[0-9]\+-alpine/golang:<NEW_GOLANG_VERSION_WITHOUT_PATCH>-alpine/g' {} \;`
2327
- [ ] `find examples \( -name Dockerfile -o -name Dockerfile.windows \) -exec sed -i 's/golang:[0-9]\+\.[0-9]\+\.[0-9]\+/golang:<NEW_GOLANG_VERSION>/g' {} \;`
24-
28+
2529
- [ ] Update the example images tag. At `build` directory, run:
2630
- [ ] `make bump-image IMAGENAME=allocation-endpoint-proxy VERSION=<current-image-version>`
2731
- [ ] `make bump-image IMAGENAME=autoscaler-webhook VERSION=<current-image-version>`
@@ -44,4 +48,4 @@ Steps to upgrade Golang version:
4448

4549
- [ ] Create a PR for the above changes and send for review
4650

47-
- [ ] Merge the above PR after it is approved
51+
- [ ] Merge the above PR after it is approved

.github/ISSUE_TEMPLATE/kubernetes_update.md

+116-56
Original file line numberDiff line numberDiff line change
@@ -7,68 +7,128 @@ assignees: ''
77

88
---
99

10-
Agones supports and is tested against 3 releases of Kubernetes, targeting the newest version as being the [default version in the GKE Rapid channel](https://cloud.google.com/kubernetes-engine/docs/release-notes#current_versions). The vendored version of client-go will be aligned with the middle of the three supported Kubernetes versions ({version_2}). All the example clusters will use the middle of the three supported Kubernetes versions ({version_2}).
10+
Agones supports and is tested against 3 releases of Kubernetes, targeting the newest version as
11+
being the [default version in the GKE Rapid channel](https://cloud.google.com/kubernetes-engine/docs/release-notes#current_versions).
12+
The vendored version of client-go will be aligned with the middle of the three supported Kubernetes
13+
versions ({version_2}). All the example clusters will use the middle of the three supported
14+
Kubernetes versions ({version_2}).
1115

1216
List of items to do for upgrading to {version_1} {version_2} {version_3}
1317

1418
- [ ] Update the cluster version of terraform submodules in `install/terraform/modules`
15-
- [ ] Update Kubernetes version of GKE cluster (both `gke` and `gke-autopilot`) to {version_2}
16-
- [ ] Update Kubernetes version of AKS to the newest supported version in {version_1} {version_2} {version_3}
17-
- [ ] Update Kubernetes version of EKS to the newest supported version in {version_1} {version_2} {version_3}
18-
- [ ] Update kubectl in dev tooling to {version_2}, the latest patch version can be found [here](https://kubernetes.io/releases/)
19-
- [ ] Update kubectl in `build/build-image/Dockerfile`
20-
- [ ] Update kubectl in `build/e2e-image/Dockerfile`
19+
- [ ] Update Kubernetes version of GKE cluster (both `gke` and `gke-autopilot`) to {version_2}
20+
- [ ] Update Kubernetes version of AKS to the newest supported version in {version_1} {version_2}
21+
{version_3}
22+
- [ ] Update Kubernetes version of EKS to the newest supported version in {version_1} {version_2}
23+
{version_3}
24+
- [ ] Update kubectl in dev tooling to {version_2}, the latest patch version can be found
25+
[here](https://kubernetes.io/releases/)
26+
- [ ] Update kubectl in `build/build-image/Dockerfile`
27+
- [ ] Update kubectl in `build/e2e-image/Dockerfile`
28+
- [ ] Update kubectl in `test/upgrade/Dockerfile`
2129
- [ ] Update the Kubernetes version of the below test clusters to {version_2}
22-
- [ ] Minikube in `build/includes/minikube.mk` (Get the patch version [here](https://kubernetes.io/releases/) since minikube supports the latest Kubernetes release)
23-
- [ ] Kind in `build/includes/kind.mk` (Confirm {version_2} is supported and get the patch version [here](https://github.com/kubernetes-sigs/kind/releases))
24-
- [ ] Update the k8s image used in the helm [pre-delete-hook](https://github.com/googleforgames/agones/blob/main/install/helm/agones/templates/hooks/pre_delete_hook.yaml) to {version_2} (Get the patch version [here](https://hub.docker.com/r/bitnami/kubectl))
25-
- [ ] Update client-go in `go.mod` to {version_2} by running `go get k8s.io/client-go@{CORRESPONDING_VERSION}` and `go get k8s.io/apiextensions-apiserver@{CORRESPONDING_VERSION}`, then re-run `go mod tidy` and `go mod vendor`
30+
- [ ] Minikube in `build/includes/minikube.mk` (Get the patch version [here](https://kubernetes.io/releases/)
31+
since minikube supports the latest Kubernetes release)
32+
- [ ] Kind in `build/includes/kind.mk` (Confirm {version_2} is supported and get the patch version
33+
[here](https://github.com/kubernetes-sigs/kind/releases))
34+
- [ ] Update the k8s image used in the helm [pre-delete-hook](https://github.com/googleforgames/agones/blob/main/install/helm/agones/templates/hooks/pre_delete_hook.yaml)
35+
to {version_2} (Get the patch version [here](https://hub.docker.com/r/bitnami/kubectl))
36+
- [ ] Update client-go in `go.mod` to {version_2} by running `go get k8s.io/client-go@{CORRESPONDING_VERSION}`
37+
and `go get k8s.io/apiextensions-apiserver@{CORRESPONDING_VERSION}`, then re-run `go mod tidy`
38+
and `go mod vendor`
2639
- [ ] Update CRD API reference to {version_2}
27-
- [ ] Update links to k8s documentation in `site/assets/templates/crd-doc-config.json`
28-
- [ ] Regenerate crd api reference docs - `make gen-api-docs`
29-
- [ ] Regenerate crd client libraries and generated code - `make gen-crd-code`
40+
- [ ] Update links to k8s documentation in `site/assets/templates/crd-doc-config.json`
41+
- [ ] Regenerate crd api reference docs - `make gen-api-docs`
42+
- [ ] Regenerate crd client libraries and generated code - `make gen-crd-code`
3043
- [ ] Regenerate Kubernetes resource includes (e.g. ObjectMeta, PodTemplateSpec)
31-
- [ ] Start a cluster with `make gcloud-test-cluster` (this cluster will use Kubernetes {version_2}), uninstall agones using `helm uninstall agones -n agones-system`, and then run `make gen-embedded-openapi` and `make gen-install`
32-
- [ ] Update documentation for creating clusters and k8s API references to align with the above clusters versions and the k8s API version
33-
- [ ] `site/config.toml`
34-
- [ ] `dev_supported_k8s`, which are {version_1} {version_2} {version_3}
35-
- [ ] `dev_k8s_api_version`, which is {version_2}
36-
- [ ] `dev_gke_example_cluster_version`, which is {version_2}
37-
- [ ] `dev_aks_example_cluster_version`, which is the newest AKS supported version in {version_1} {version_2} {version_3}
38-
- [ ] `dev_eks_example_cluster_version`, which is the newest EKS supported version in {version_1} {version_2} {version_3}
39-
- [ ] `dev_minikube_example_cluster_version`, which is {version_2} with the supported patch version
44+
- [ ] Start a cluster with `make gcloud-test-cluster` (this cluster will use Kubernetes
45+
{version_2}), uninstall agones using `helm uninstall agones -n agones-system`, and then run
46+
`make gen-embedded-openapi` and `make gen-install`
47+
- [ ] Update documentation for creating clusters and k8s API references to align with the above
48+
clusters versions and the k8s API version
49+
- [ ] `site/config.toml`
50+
- [ ] `dev_supported_k8s`, which are {version_1} {version_2} {version_3}
51+
- [ ] `dev_k8s_api_version`, which is {version_2}
52+
- [ ] `dev_gke_example_cluster_version`, which is {version_2}
53+
- [ ] `dev_aks_example_cluster_version`, which is the newest AKS supported version in
54+
{version_1} {version_2} {version_3}
55+
- [ ] `dev_eks_example_cluster_version`, which is the newest EKS supported version in
56+
{version_1} {version_2} {version_3}
57+
- [ ] `dev_minikube_example_cluster_version`, which is {version_2} with the supported patch version
4058
- [ ] If client-go pulled in a new version of gRPC, then also
41-
- [ ] Update the `grpc_release_tag` in the SDK [base image grpc version](https://github.com/googleforgames/agones/blob/main/build/includes/sdk.mk).
42-
- [ ] Update the gRPC version number in C++ gRPC Dependency documentation [here](https://github.com/googleforgames/agones/blob/main/site/content/en/docs/Guides/Client%20SDKs/cpp.md).
43-
- [ ] Update the gRPC version
44-
([Dockerfile](https://github.com/googleforgames/agones/blob/main/examples/cpp-simple/Dockerfile))
45-
- [ ] Update the C++ `cpp-simple` image.
46-
- [ ] Update the `cpp-simple` example images tag. At `build` directory, run:
47-
- [ ] `make bump-image IMAGENAME=cpp-simple-server VERSION=<current-image-version>`
48-
- [ ] Run the following to generate and push the new `cpp-simple` example images:
49-
- [ ] In `examples/cpp-simple`, run: `make cloud-build`
50-
- [ ] Regenerate all client sdks: [make gen-all-sdk-grpc](https://github.com/googleforgames/agones/blob/main/build/README.md#make-gen-all-sdk-grpc)
51-
This can take 20 minutes or so, as the above changes force a rebuild. Plan your day accordingly 😃.
52-
- [ ] Regenerate allocated API endpoints: [make gen-allocation-grpc](https://github.com/googleforgames/agones/blob/main/build/README.md#make-gen-allocation-grpc)
53-
- [ ] Confirm the update works as expected by running e2e tests
54-
- [ ] Add the new supported Kubernetes versions to the e2e clusters creation
55-
- [ ] In `build/terraform/e2e/module.tf`, add the new supported version to the map `kubernetes_versions` following the instructions in the comment. We maintain sufficient quota for `CPUs` and `In-use Addresses` in `us-east1`, `us-west1`, `europe-west1`, and `asia-east1`, but we only have capacity for one version per region - follow the instructions to rotate the regions through new versions. (Keep the clusters on `RAPID` - we dogfood early versions in CI.)
56-
- [ ] Recreate clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
57-
- [ ] Update the Cloud Build configuration to run e2e test on the new created clusters, and disable the e2e test on the cluster with the oldest supported K8s version
58-
- [ ] Update the `versionsAndRegions` variable to add the new supported version and remove the oldest supported K8s version in `cloudbuild.yaml` `submit-e2e-test-cloud-build` step
59-
- [ ] Update the `featureWithGateByVersion` variable to add the new supported version and remove the oldest supported K8s version in `cloudbuild.yaml` `submit-e2e-test-cloud-build` step
60-
- [ ] Run `make lint` for code quality check.
61-
- [ ] Submit a PR to trigger the e2e tests and verfiy they all pass
62-
- [ ] After the PR that includes the above Cloud Build configuration change has been merged and all the existing pending PRs in the Cloud Build queue have picked up the new configuration, submit a separate PR to update the e2e clusters terraform module to remove the e2e cluster with the oldest supported K8s version.
63-
- [ ] In `build/terraform/e2e/module.tf`, continue following the instructions in the comment to update the `kubernetes_versions` map.
64-
- [ ] Destroy the old clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
59+
- [ ] Update the `grpc_release_tag` in the SDK [base image grpc version](https://github.com/googleforgames/agones/blob/main/build/includes/sdk.mk).
60+
- [ ] Update the gRPC version number in C++ gRPC Dependency documentation [here](https://github.com/googleforgames/agones/blob/main/site/content/en/docs/Guides/Client%20SDKs/cpp.md).
61+
- [ ] Update the gRPC version ([Dockerfile](https://github.com/googleforgames/agones/blob/main/examples/cpp-simple/Dockerfile))
62+
- [ ] Update the C++ `cpp-simple` image.
63+
- [ ] Update the `cpp-simple` example images tag. At `build` directory, run:
64+
- [ ] `make bump-image IMAGENAME=cpp-simple-server VERSION=<current-image-version>`
65+
- [ ] Run the following to generate and push the new `cpp-simple` example images:
66+
- [ ] In `examples/cpp-simple`, run: `make cloud-build`
67+
- [ ] Regenerate all client sdks: [make gen-all-sdk-grpc](https://github.com/googleforgames/agones/blob/main/build/README.md#make-gen-all-sdk-grpc)
68+
This can take 20 minutes or so, as the above changes force a rebuild. Plan your day accordingly 😃.
69+
- [ ] Regenerate allocated API endpoints: [make gen-allocation-grpc](https://github.com/googleforgames/agones/blob/main/build/README.md#make-gen-allocation-grpc)
70+
- [ ] Confirm the update works as expected by running e2e and upgrade tests
71+
- [ ] Add the new supported Kubernetes versions to the e2e clusters creation
72+
- [ ] In `build/terraform/e2e/module.tf`, add the new supported version to the map
73+
`kubernetes_versions` following the instructions in the comment. We maintain sufficient
74+
quota for `CPUs` and `In-use Addresses` in `us-east1`, `us-west1`, `europe-west1`, and
75+
`asia-east1`, but we only have capacity for one version per region - follow the
76+
instructions to rotate the regions through new versions. (Keep the clusters on `RAPID` -
77+
we dogfood early versions in CI.)
78+
- [ ] Recreate clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
79+
- [ ] Add the new supported Kubernetes versions to the upgrade clusters creation
80+
- [ ] In `build/terraform/upgrade/module.tf`, add the new supported version to the map
81+
`kubernetes_versions` following the instructions in the comment. Follow the instructions
82+
to rotate the regions through new versions. (Keep the clusters on `RAPID`.) Note that the
83+
upgrade clusters do not use the exact same regions as the e2e tests.
84+
- [ ] Recreate the clusters with terraform:
85+
```
86+
cd build; make shell; cd build/terraform/upgrade
87+
terraform init -backend-config="bucket=agones-images-upgrade-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
88+
terraform apply -var project="agones-images"
89+
```
90+
- [ ] Update the Cloud Build configuration to run e2e and ugprade tests on the new created clusters,
91+
and disable the e2e and ugprade tests on the clusters with the oldest supported K8s version
92+
- [ ] Update the `versionsAndRegions` variable to add the new supported version and remove the
93+
oldest supported K8s version in `cloudbuild.yaml` `submit-e2e-test-cloud-build` step
94+
- [ ] Update the `featureWithGateByVersion` variable to add the new supported version and remove
95+
the oldest supported K8s version in `cloudbuild.yaml` `submit-e2e-test-cloud-build` step
96+
- [ ] Update the `versionsAndRegions` variable to add the new supported version and remove the
97+
oldest supported K8s version in `cloudbuild.yaml` `submit-upgrade-test-cloud-build` step
98+
- [ ] Update the `test/upgrade/versionMap.yaml` `k8sToAgonesVersions` to add the new Kubernetes
99+
version. For example:
100+
```
101+
],
102+
"1.32": [
103+
"Dev"
104+
]
105+
```
106+
- [ ] Run `make lint` for code quality check.
107+
- [ ] Submit a PR to trigger the e2e and upgrade tests and verfiy they all pass
108+
- [ ] After the PR that includes the above Cloud Build configuration change has been merged and
109+
all the existing pending PRs in the Cloud Build queue have picked up the new configuration,
110+
submit a separate PR to update the e2e and upgrade clusters terraform modules to remove the
111+
e2e and upgrade clusters with the oldest supported K8s version.
112+
- [ ] In `build/terraform/e2e/module.tf`, continue following the instructions in the comment to
113+
update the `kubernetes_versions` map.
114+
- [ ] Destroy the old clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
115+
- [ ] In `build/terraform/upgrade/module.tf`, continue following the instructions in the comment
116+
to update the `kubernetes_versions` map.
117+
- [ ] Run the same terraform command as in the previous step:
118+
```
119+
cd build; make shell; cd build/terraform/upgrade
120+
terraform init -backend-config="bucket=agones-images-upgrade-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
121+
terraform apply -var project="agones-images"
122+
```
65123
- [ ] Recreate the performance test cluster, and config the performance test to run on the new cluster
66-
- [ ] In `build/terraform/performance/module.tf`, update the `kubernetes_versions` to {version_2} and make sure the region is always set to `us-central1`.
67-
- [ ] Recreate the cluster with the new script:
68-
```
69-
cd build; make shell; cd build/terraform/performance
70-
terraform init -backend-config="bucket=agones-images-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
71-
terraform apply -var project="agones-images"
72-
```
73-
- [ ] Update the `_TEST_CLUSTER_NAME` in `ci/perf-test-cloudbuild.yaml` to the name of the new created performance test cluster, and send a PR with the changes.
74-
-
124+
- [ ] In `build/terraform/performance/module.tf`, update the `kubernetes_versions` to {version_2}
125+
and make sure the region is always set to `us-central1`.
126+
- [ ] Recreate the cluster with the new script:
127+
```
128+
cd build; make shell; cd build/terraform/performance
129+
terraform init -backend-config="bucket=agones-images-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
130+
terraform apply -var project="agones-images"
131+
```
132+
- [ ] Update the `_TEST_CLUSTER_NAME` in `ci/perf-test-cloudbuild.yaml` to the name of the newly
133+
created performance test cluster, and send a PR with the changes.
134+
-

0 commit comments

Comments
 (0)