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