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

Updates upgrade test to install multiple versions of Agones on a cluster in succession #3982

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

igooch
Copy link
Collaborator

@igooch igooch commented Sep 10, 2024

What type of PR is this?

/kind feature

What this PR does / Why we need it:

This creates a basic config walker that installs all versions of Agones that are valid for a cluster on a particular Kubernetes versions. One valid version of Agones is installed, and the controller waits until the Helm release (Agones installation) is ready (deployed) before installing the next version.

Which issue(s) this PR fixes:

Working on #3795

Special notes for your reviewer:

The upgrade-test-runner Job runs a pod that is effectively a controller uses Helm to install Agones into the agones-system namespace on the same cluster. This Job needs to have all of the permissions of both Helm and Agones in order to use and create those resources.

Wait groups do not work for waiting on Kubernetes or Helm, so we use wait.PollUntilContextTimeout instead, similar to other e2e tests in Agones.

There are a number of //TODOs in the main file denoting pieces that are not included in this particular PR, but will need to be included in future PRs.

To run:

  • Have a running Kubernetes cluster
  • Have REGISTRY set to your artifact registry
  • The $(REGISTRY) value in upgradeTest.yaml currently needs to be manually set to your registry
  • make build && make push to your registry
  • kubectl apply -f permissions.yaml for reading Pod and Node and installing Agones
  • kubectl apply -f versionMap.yaml to load the configmap
  • kubectl apply -f upgradeTest.yaml to run the test runner
  • You should be able to see logs in logs explorer with filter resource.labels.container_name="upgrade-test-controller"
  • Run kubectl get po -n agones-system to see the Agones pods. These are expected to crash loop a couple times when running on an Autopilot cluster as the Autopilot cluster needs to scale up to accommodate the pods.
  • Check kubectl get jobs --watch to see if the job is still running.
  • Once the job is finished you should be able to see all of the previously installed Helm revisions by running helm history agones -n agones-system. Example for a Kubernetes version 1.29 cluster:
me@me:~/agones/test/upgrade$ helm list -aA
NAME  	NAMESPACE    	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
agones	agones-system	4       	2024-09-10 21:24:12.099119645 +0000 UTC	deployed	agones-1.43.0	1.43.0
me@me:~/agones/test/upgrade$ helm history agones -n agones-system
REVISION	UPDATED                 	STATUS    	CHART        	APP VERSION	DESCRIPTION
1       	Tue Sep 10 21:18:53 2024	superseded	agones-1.40.0	1.40.0     	Install complete
2       	Tue Sep 10 21:21:42 2024	superseded	agones-1.41.0	1.41.0     	Upgrade complete
3       	Tue Sep 10 21:23:23 2024	superseded	agones-1.42.0	1.42.0     	Upgrade complete
4       	Tue Sep 10 21:24:12 2024	deployed  	agones-1.43.0	1.43.0     	Upgrade complete

@igooch igooch requested a review from gongmax September 10, 2024 21:52
@github-actions github-actions bot added kind/feature New features for Agones size/L labels Sep 10, 2024
@igooch igooch force-pushed the testInPlaceUpgrades branch from 6cdd881 to 8cbdf19 Compare September 10, 2024 21:54
@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: e6a67137-8741-46d9-bf54-575f827ed7ad

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@igooch igooch force-pushed the testInPlaceUpgrades branch from 8cbdf19 to b298c1f Compare September 10, 2024 22:26
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: b524d267-46fb-48c3-a73a-82b21475f6a5

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/3982/head:pr_3982 && git checkout pr_3982
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-b298c1f

test/upgrade/main.go Show resolved Hide resolved
test/upgrade/main.go Show resolved Hide resolved
test/upgrade/main.go Show resolved Hide resolved
test/upgrade/upgradeTest.yaml Show resolved Hide resolved
@igooch igooch force-pushed the testInPlaceUpgrades branch from 61d3028 to 8646c26 Compare September 13, 2024 15:37
@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 1eb2a7d8-315b-49b0-810b-114622e792d1

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: abc17acf-69fb-4b48-be9f-6107b66aa9ba

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/3982/head:pr_3982 && git checkout pr_3982
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-8646c26

@igooch igooch force-pushed the testInPlaceUpgrades branch from 8646c26 to 079c7ab Compare September 13, 2024 18:03
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: f229b7a3-beaa-481f-871b-0e59d6dc6c59

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/3982/head:pr_3982 && git checkout pr_3982
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-079c7ab

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 55c81a37-6d4e-48a7-8a04-0be02a505bd6

Status: FAILURE

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@igooch igooch force-pushed the testInPlaceUpgrades branch from cdf3ff4 to ee46947 Compare September 16, 2024 18:51
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: a332445f-7bf8-4b9c-8c8f-55e29842b801

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

git fetch https://github.com/googleforgames/agones.git pull/3982/head:pr_3982 && git checkout pr_3982
helm install agones ./install/helm/agones --namespace agones-system --set agones.image.registry=us-docker.pkg.dev/agones-images/ci --set agones.image.tag=1.44.0-dev-ee46947

@gongmax gongmax merged commit 50d88e6 into googleforgames:main Sep 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features for Agones size/L size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants