Skip to content

resources: Align models with upstream Agones structs#25

Open
NAME-ASHWANIYADAV wants to merge 1 commit into
agones-dev:mainfrom
NAME-ASHWANIYADAV:fix/resource-model-alignment
Open

resources: Align models with upstream Agones structs#25
NAME-ASHWANIYADAV wants to merge 1 commit into
agones-dev:mainfrom
NAME-ASHWANIYADAV:fix/resource-model-alignment

Conversation

@NAME-ASHWANIYADAV

Copy link
Copy Markdown
Contributor

Type of change

  • 🐛 Bug fix
  • 🚀 New feature / enhancement
  • 📖 Documentation
  • 🧹 Refactoring / cleanup
  • ⚙️ CI / tooling
  • ⚠️ Breaking change

What this PR does

Aligns the GameServer, Fleet, and FleetAutoscaler TypeScript models with the upstream Agones Go structures. This ensures that the plugin correctly parses and displays all available data from the Kubernetes API.

Specific alignments include:

  • GameServer: Added support for eviction (with correct default Never), addresses, and reservedUntil fields.
  • Fleet: Added support for allocationOverflow, priorities, counters, and lists.
  • FleetAutoscaler: Added support for wasm policies and corrected the schedule.activePeriod cron field from schedule to startCron.
  • UI Fixes: Updated Overview.tsx to include Reserved in STATE_ORDER and updated the FleetAutoscaler Detail view to correctly reference the fixed startCron field.

Screenshots / recordings

Test plan

Automated checks

  • npm ci
  • npm run build
  • npm run tsc
  • npm run lint
  • npm run format -- --check
  • npm run test

Manual verification

  • Tested in Headlamp against a cluster with Agones installed

Manually verified that the UI renders without errors when encountering the newly supported fields, and confirmed that the models successfully map data from the Agones CRDs.

RBAC considerations

N/A - No new Kubernetes permissions are required.

Notes for reviewers

This PR focuses strictly on aligning the type models. Comprehensive unit tests for these resources, along with the necessary Vitest testing infrastructure, are included in a follow-up PR (fix/test-infra-gameserver) to keep this review focused and atomic.

Signed-off-by: ashwani yadav <22ashwaniyadav@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant