Skip to content

feat: add matchExpressions support to Allocation Service#4630

Merged
markmandel merged 2 commits into
agones-dev:mainfrom
markmandel:feature/allocator-label-selectors
Jun 26, 2026
Merged

feat: add matchExpressions support to Allocation Service#4630
markmandel merged 2 commits into
agones-dev:mainfrom
markmandel:feature/allocator-label-selectors

Conversation

@markmandel

Copy link
Copy Markdown
Member

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:

  • Introduce MatchExpressions to GameServerSelector for enhanced label-based selection alongside MatchLabels.
  • Update allocation logic to convert match expressions between internal and external representations.
  • Add e2e test TestAllocatorWithMatchExpressions to validate these scenarios.

Which issue(s) this PR fixes:

Closes #2028

Did you use AI tools in preparing this PR?:

Y

Special notes for your reviewer:

This was in my brain, and was an easy thing to get Claude to do.

@markmandel markmandel requested a review from a team June 22, 2026 21:58
@github-actions github-actions Bot added the kind/feature New features for Agones label Jun 22, 2026
@markmandel markmandel added area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc and removed kind/feature New features for Agones labels Jun 22, 2026
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: 9c126653-11e5-4f84-96fd-2eb884777550

Status: FAILURE

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

@github-actions github-actions Bot added the kind/feature New features for Agones label Jun 22, 2026
@markmandel markmandel force-pushed the feature/allocator-label-selectors branch from f477574 to a8dc522 Compare June 22, 2026 23:04
map<string, string> annotations = 2;
}

// LabelMatchExpressions is a selector that contains values, a key, and an operator

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this file get's copied over with make gen-all-sdk-grpc -- probably doesn't need to, but that's a cleanup task for another day.

@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: b6e565fd-b8c6-46b6-8bb3-1fe825ca3337

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/4630/head:pr_4630 && git checkout pr_4630
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.59.0-dev-a8dc522

@markmandel markmandel force-pushed the feature/allocator-label-selectors branch from a8dc522 to 564a17e Compare June 24, 2026 18:52
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Failed 😭

Build Id: c3b9c356-49cd-41fc-8fdb-52ca38a44264

Status: FAILURE

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

* Introduce `MatchExpressions` to `GameServerSelector` for enhanced
label-based selection alongside `MatchLabels`.
* Update allocation logic to convert match expressions between internal
and external representations.
* Add e2e test `TestAllocatorWithMatchExpressions` to validate these
scenarios.

Closes agones-dev#2028

Signed-off-by: Mark Mandel <mark@compoundtheory.com>
@markmandel markmandel force-pushed the feature/allocator-label-selectors branch from 564a17e to 06507ed Compare June 24, 2026 19:08
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: 53199bfa-2ab0-4cbb-b8c8-a5b242cdd4b6

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/4630/head:pr_4630 && git checkout pr_4630
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.59.0-dev-06507ed

@lacroixthomas lacroixthomas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@markmandel markmandel enabled auto-merge (squash) June 25, 2026 23:47
@agones-bot

Copy link
Copy Markdown
Collaborator

Build Succeeded 🥳

Build Id: a4ef1323-a0da-41a0-a2df-5f48b462297f

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/4630/head:pr_4630 && git checkout pr_4630
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.59.0-dev-4ab5c33

@markmandel markmandel merged commit e7bb608 into agones-dev:main Jun 26, 2026
4 checks passed
@markmandel markmandel deleted the feature/allocator-label-selectors branch June 26, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/user-experience Pertaining to developers trying to use Agones, e.g. SDK, installation, etc kind/feature New features for Agones size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support full filtering expressions on the Allocator Service

3 participants