Skip to content

fix: ensure fleet autoscaler policy are namespaced#4098

Merged
markmandel merged 17 commits intoagones-dev:mainfrom
lacroixthomas:fix/fleet-autoscaler-not-namespaced
Apr 22, 2025
Merged

fix: ensure fleet autoscaler policy are namespaced#4098
markmandel merged 17 commits intoagones-dev:mainfrom
lacroixthomas:fix/fleet-autoscaler-not-namespaced

Conversation

@lacroixthomas
Copy link
Copy Markdown
Collaborator

@lacroixthomas lacroixthomas commented Jan 24, 2025

What type of PR is this?
/kind bug

What this PR does / Why we need it:
Ensure the fleet autoscaler policy are namespaced, to ensure it's not autoscaling on all namespaces (on fleet with same name but from different namespaces)

Which issue(s) this PR fixes:
Closes #3954

Special notes for your reviewer:
Did some manual tests following the steps described on the issue.

TODO:

  • Manual testing
  • Make sure the syncFleet() and the updateFleet() are also namespaced
  • Fixed current unit tests

@github-actions github-actions bot added kind/bug These are bugs. size/M labels Jan 24, 2025
@0xaravindh
Copy link
Copy Markdown

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: ab15f2ec-5595-4ef5-8530-9eddaa897305

Status: FAILURE

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

@lacroixthomas lacroixthomas force-pushed the fix/fleet-autoscaler-not-namespaced branch from b5a6d1a to e9a8b98 Compare January 25, 2025 15:26
@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 8f343cff-43c4-4726-90fc-d566ff758fbf

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/4098/head:pr_4098 && git checkout pr_4098
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.47.0-dev-e9a8b98

@lacroixthomas lacroixthomas marked this pull request as ready for review January 25, 2025 20:05
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 2f991fa6-7c3c-4cc0-a929-8e3d8671dc04

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-2b0f5e3

@igooch
Copy link
Copy Markdown
Collaborator

igooch commented Mar 3, 2025

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 9e7638f9-b613-4b48-95b4-e580805204e9

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-b7c29c3

@igooch
Copy link
Copy Markdown
Collaborator

igooch commented Mar 10, 2025

Would you be able to add a test that tests for the issue in the original issue? I.e. a test that ensures that two fleets with the same name in different namespaces scale up independently?

@lacroixthomas
Copy link
Copy Markdown
Collaborator Author

lacroixthomas commented Mar 10, 2025

Would you be able to add a test that tests for the issue in the original issue? I.e. a test that ensures that two fleets with the same name in different namespaces scale up independently?

Yes, I'm gonna do that, I would imagine an e2e test ?

Currently, it seems that the namespace is set by the e2eframework, it only expect a single namespace https://github.com/googleforgames/agones/blob/main/test/e2e/framework/framework.go#L168, I can have a look on how to manage multiple ones at the same time

@lacroixthomas
Copy link
Copy Markdown
Collaborator Author

Actually, this could be something similar to the allocator one: https://github.com/googleforgames/agones/blob/main/test/e2e/allocator_test.go#L564C6-L564C33

Will add the e2e test this week

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: befe7ab2-a697-4304-b7e1-b21f1c692e84

Status: FAILURE

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

@lacroixthomas
Copy link
Copy Markdown
Collaborator Author

My e2e test is not valid, it's also passing on the main branch, will come back to it this week

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 1d8aca5a-8571-4098-8da8-6ab3fc5195db

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-95039f3

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: f1a3cbca-f1ff-4b76-bbda-5a6d0b0c6f93

Status: FAILURE

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

@lacroixthomas lacroixthomas marked this pull request as draft March 12, 2025 23:59
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 3adc7671-a020-4358-8443-da33fe7bb104

Status: FAILURE

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

@lacroixthomas lacroixthomas marked this pull request as ready for review March 13, 2025 17:33
@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 76745580-f4dc-4969-8996-a3483ca02f71

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-c6e2f3d

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 9a1ee354-e856-460c-ba9d-73c39d91c0b6

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-53019ff

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 1d0c1983-4127-46d9-99d6-8a7592751cec

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/4098/head:pr_4098 && git checkout pr_4098
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.48.0-dev-8426e5d

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 71e41609-665d-4bb4-9c6b-55d593464749

Status: FAILURE

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

@lacroixthomas
Copy link
Copy Markdown
Collaborator Author

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 0edf2f1e-e1df-4479-a967-b91f96315c5a

Status: FAILURE

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

@0xaravindh
Copy link
Copy Markdown

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 56e8a228-fd33-4d1d-b3a5-27c896d47ce7

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/4098/head:pr_4098 && git checkout pr_4098
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-565ebc4

Copy link
Copy Markdown
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

LGTM. Nice change.

@markmandel markmandel enabled auto-merge (squash) April 22, 2025 02:05
@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: b4483729-24a3-4b80-b577-4c6dd1c24bec

Status: FAILURE

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

@markmandel
Copy link
Copy Markdown
Collaborator

/gcbrun

@agones-bot
Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 24a30463-ebfc-4c98-a748-0c2712754aa8

Status: FAILURE

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

@markmandel markmandel merged commit 8071954 into agones-dev:main Apr 22, 2025
4 checks passed
@lacroixthomas lacroixthomas mentioned this pull request Aug 13, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug These are bugs. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FleetAutoscaler with Counter policy trying to scale Fleet to negative replicas count

5 participants