Skip to content

Conversation

markmandel
Copy link
Collaborator

@markmandel markmandel commented Apr 7, 2025

What type of PR is this?

Uncomment only one /kind <> line, press enter to put that in a new line, and remove leading whitespace from that line:

/kind breaking

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind hotfix
/kind release

What this PR does / Why we need it:

This is a breaking change for both how health checking works and to the SDK lifecycles, but behind the SidecarContainer feature flag.

  1. This moves the sdkserver into a initContainer with a RestartPolicy of always. This means that it will be alive for the entirety of the main Pod's containers.
  2. There is no waiting for the Shutdown signal any more for the sidecar container before shutting down since it now natively waits for the main Pod containers.
  3. The RestartPolicy of the gameserver container defaults to Never (although it can be changed), and no longer restarts before the Ready state to simplify lifecycle health checking.
  4. Various hacky health checks are now simplified to "is the Pod in a Failed state.", and therefore we no longer need to do as much text searching for edge cases.

Which issue(s) this PR fixes:

Work on #3642

Special notes for your reviewer:

Next: Write the docs for this work.

@markmandel markmandel added the kind/breaking Breaking change label Apr 7, 2025
@markmandel markmandel requested review from gongmax and igooch April 7, 2025 01:46
@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: 743d2942-f5ea-4307-87a4-0ac7f292afc7

Status: FAILURE

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

@markmandel
Copy link
Collaborator Author

@igooch @gongmax can you cycle the autopilot clusters please? 😄

@markmandel markmandel force-pushed the feature/sidecar-containers branch from 9a34a42 to eab7749 Compare April 7, 2025 20:27
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: bcd4442a-a271-4d0b-b317-8f0aa3cff6f3

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-eab7749

@markmandel markmandel force-pushed the feature/sidecar-containers branch from eab7749 to b4ecf04 Compare April 10, 2025 00:32
@markmandel
Copy link
Collaborator Author

Conflicts fixed. Gentle bump on review plz :)

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 82100b9d-79d2-42a1-a84f-870207efca0f

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-b4ecf04

@markmandel markmandel requested a review from peterzhongyi April 12, 2025 00:01
@markmandel markmandel force-pushed the feature/sidecar-containers branch from b4ecf04 to 1e58065 Compare April 12, 2025 00:06
@peterzhongyi
Copy link
Collaborator

Thanks Mark! I'll take a look! Coincidentally, I just met with a potential customer who's evaluating Agones and they were specifically interested in GameServer's pod restart policy induced edge cases. So this PR might change a lot of things!

@agones-bot
Copy link
Collaborator

Build Failed 😭

Build Id: e780bc6f-9ccc-432d-97d4-1274f44aadba

Status: FAILURE

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

@markmandel
Copy link
Collaborator Author

Looks like it's time to recycle the autopilot clusters please.

@igooch
Copy link
Collaborator

igooch commented Apr 14, 2025

Looks like it's time to recycle the autopilot clusters please.

Updating now.

@peterzhongyi
Copy link
Collaborator

/gcbrun

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 9aadf63a-9089-4c62-b4de-bbdf0cc35d7d

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-1e58065

@markmandel markmandel force-pushed the feature/sidecar-containers branch from 1e58065 to 884674e Compare April 15, 2025 01:14
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 5be3d922-35be-4d70-9a00-76f5be90d09f

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-884674e

@markmandel markmandel force-pushed the feature/sidecar-containers branch 2 times, most recently from dce1a86 to bcd0c0b Compare April 17, 2025 03:04
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: bc079cc7-a5e7-4adb-a1f0-57408872e367

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-bcd0c0b

@@ -334,7 +334,7 @@ test-e2e-integration: GO_E2E_TEST_INTEGRATION_ARGS ?=\
test-e2e-integration: $(ensure-build-image)
echo "Starting e2e integration test!"
ifdef E2E_USE_GOTESTSUM
$(GOTESTSUM) --packages=$(agones_package)/test/e2e -- $(go_test_args) -timeout=30m $(ARGS) -args \
$(GOTESTSUM) --packages=$(agones_package)/test/e2e -- $(go_test_args) -timeout=45m $(ARGS) -args \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert back down to 30m?

This is a breaking change for both how health checking works
and to the SDK lifecycles, but behind the `SidecarContainer` feature flag.

1. This moves the sdkserver into a initContainer with a `RestartPolicy` of always.
   This means that it will be alive for the entirety of the main Pod's containers.
2. There is no waiting for the Shutdown signal any more for the sidecar container before
   shutting down since it now natively waits for the main Pod containers.
3. The RestartPolicy of the `gameserver` container defaults to `Never` (although it can be changed),
   and no longer restarts before the `Ready` state to simplify lifecycle health checking.
4. Various hacky health checks are now simplified to "is the Pod in a `Failed` state.", and therefore
   we no longer need to do as much text searching for edge cases.

Next: Write the docs to make sure this change all works.

Work on googleforgames#3642
@markmandel markmandel force-pushed the feature/sidecar-containers branch from bcd0c0b to cda7ff3 Compare April 29, 2025 03:52
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: accafeee-0a46-4579-8686-fdc0bdd786e8

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-cda7ff3

@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: daa9c466-b770-4f65-94f0-0628d8791ff5

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-7d74c4e

@markmandel markmandel enabled auto-merge (squash) April 30, 2025 20:57
@agones-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: aee3da24-e49f-4528-9892-388074c0fece

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/4146/head:pr_4146 && git checkout pr_4146
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.49.0-dev-2166bee

@markmandel markmandel merged commit 533ff3f into googleforgames:main Apr 30, 2025
4 checks passed
@markmandel markmandel deleted the feature/sidecar-containers branch April 30, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/breaking Breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants