Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add steps to update performance test clusters when upgrading k8s version #3501

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/ISSUE_TEMPLATE/kubernetes_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,21 @@ List of items to do for upgrading to {version_1} {version_2} {version_3}
- [ ] Regenerate allocated API endpoints: [make gen-allocation-grpc](https://github.com/googleforgames/agones/blob/main/build/README.md#make-gen-allocation-grpc)
- [ ] Confirm the update works as expected by running e2e tests
- [ ] Add the new supported Kubernetes versions to the e2e clusters creation
- [ ] In `terraform/e2e/module.tf`, add the new supported version to the map `kubernetes_versions`. Noted the location of the new clusters should have enough quota (CPU, In-use IP addresses) to create the cluster. And the new supported version is usually only available in RAPID channel.
- [ ] In `build/terraform/e2e/module.tf`, add the new supported version to the map `kubernetes_versions`. Noted the location of the new clusters should have enough quota (CPU, In-use IP addresses) to create the cluster. And the new supported version is usually only available in RAPID channel.
- [ ] Recreate clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
- [ ] 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
- [ ] 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
- [ ] Run `make lint` for code quality check.
- [ ] Submit a PR to trigger the e2e tests and verfiy they all pass
- [ ] 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.
- [ ] In `terraform/e2e/module.tf`, remove the oldest supported version from the map `kubernetes_versions`.
- [ ] In `build/terraform/e2e/module.tf`, remove the oldest supported version from the map `kubernetes_versions`.
- [ ] Destroy the old clusters with new scripts: `cd build; make GCP_PROJECT=agones-images gcloud-e2e-test-cluster`
Kalaiselvi84 marked this conversation as resolved.
Show resolved Hide resolved
- [ ] Recreate the performance test cluster, and config the performance test to run on the new cluster
- [ ] In `build/terraform/performance/module.tf`, update the `kubernetes_versions` to {version_2} and its corresponding region.
- [ ] Recreate the cluster with the new script:
```
cd build; make shell; cd build/terraform/performance
terraform init -backend-config="bucket=agones-images-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
terraform apply -var project="agones-images"
```
- [ ] Update the `_TEST_CLUSTER_NAME` in `ci/perf-test-cloudbuild.yaml` to the name of the new created performance test cluster.
8 changes: 4 additions & 4 deletions build/terraform/performance/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
// Run:
// terraform init -backend-config="bucket=<YOUR_GCP_ProjectID>-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
// terraform apply -var project="<YOUR_GCP_ProjectID>"
// The performance test cluster is hosted in project `agones-e2e-1`, i.e:
// terraform init -backend-config="bucket=agones-e2e-1-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
// terraform apply -var project="agones-e2e-1"
// The performance test cluster is hosted in project `agones-images`, i.e:
// terraform init -backend-config="bucket=agones-images-performance-infra-bucket-tfstate" -backend-config="prefix=terraform/state"
// terraform apply -var project="agones-images"

terraform {
required_version = ">= 1.0.0"
Expand All @@ -41,7 +41,7 @@ variable "kubernetes_versions" {
description = "Create performance test clusters with these k8s versions in these regions"
type = map(list(string))
default = {
"1.26" = ["us-central1", "REGULAR"]
"1.27" = ["us-central1", "REGULAR"]
}
}

Expand Down