e2e: add webhook autoscaler test with fleet metadata #4251
e2e: add webhook autoscaler test with fleet metadata #42510xaravindh merged 6 commits intoagones-dev:mainfrom
Conversation
- Implemented an end-to-end test for the webhook autoscaler that validates fleet metadata is passed through correctly. - Updated defaultAutoscalerWebhook to accept a parameter for FIXED_REPLICAS, enabling tests to toggle override behavior as needed. - Ensures fleet replicas scale to the expected fixed value when metadata annotations are applied. Fixes agones-dev#4117
markmandel
left a comment
There was a problem hiding this comment.
A minor nit, but otherwise looks good.
🤔 wondering if we want to test labels? We could do the same test for annotation we do for a label? (basically just make the webhook look to see if there is a label OR annotation, and react appropriately?)
Only other idea I have.
test/e2e/fleetautoscaler_test.go
Outdated
| t.Parallel() | ||
|
|
||
| ctx := context.Background() | ||
| fmt.Println("framework.Namespace", framework.Namespace) |
There was a problem hiding this comment.
Rather than using fmt.Println(), I would use:
There was a problem hiding this comment.
I removed the unnecessary logs.
|
Build Failed 😭 Build Id: 940b9446-d16e-450e-8504-bb539ded63bb Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
Build Failed 😭 Build Id: a638039e-eb54-40ab-be13-62bb6246bb41 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
@vicentefb The
|
|
Build Failed 😭 Build Id: e5dc2ad3-7aef-431e-966d-906c60933546 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
/gcbrun |
|
Build Failed 😭 Build Id: 1fd008eb-3ad5-44f1-b6dd-2005c49852ad Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
/gcbrun |
|
Build Failed 😭 Build Id: ef4c4dd5-1194-440b-b863-c6dd3ceb019b Status: TIMEOUT To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
Build Failed 😭 Build Id: aaa49b96-6cea-4b95-9ba7-91a8049a807a Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
/gcbrun |
|
Build Failed 😭 Build Id: 3499cc47-8c94-40a7-8cb8-4f52608816aa Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
/gcbrun |
|
Build Succeeded 🥳 Build Id: 1f582213-d94b-49a3-b2b8-b3e70a56c2a0 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: |

What type of PR is this?
/kind cleanup
What this PR does / Why we need it:
fleet metadata is passed through correctly.
enabling tests to toggle override behavior as needed.
annotations are applied.
Which issue(s) this PR fixes:
Closes #4117
Special notes for your reviewer:
I haven’t generated the
example/autoscaler-webhookimage for versionv0.19yet. Because of this, the test case will currently fail. Once the PR is reviewed, I will create the image.