Skip to content

Commit

Permalink
Move FleetAllocationOverflow to Beta (#3515)
Browse files Browse the repository at this point in the history
* Move FleetAllocationOverflow to Beta

* small tweak

* Review changes

* review changes
  • Loading branch information
Kalaiselvi84 authored Nov 21, 2023
1 parent f5bdb4d commit ddadfe7
Show file tree
Hide file tree
Showing 11 changed files with 953 additions and 837 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ KIND_CONTAINER_NAME=$(KIND_PROFILE)-control-plane
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.22

# Enable all alpha feature gates. Keep in sync with `false` (alpha) entries in pkg/util/runtime/features.go:featureDefaults
ALPHA_FEATURE_GATES ?= "PlayerAllocationFilter=true&PlayerTracking=true&CountsAndLists=true&FleetAllocationOverflow=true&DisableResyncOnSDKServer=true&Example=true"
ALPHA_FEATURE_GATES ?= "PlayerAllocationFilter=true&PlayerTracking=true&CountsAndLists=true&DisableResyncOnSDKServer=true&Example=true"

# Build with Windows support
WITH_WINDOWS=1
Expand Down
4 changes: 2 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,10 @@ steps:
region=${versionsAndRegions[$version]}
if [ $cloudProduct = generic ]
then
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=false&SplitControllerAndExtensions=false&FleetAllocationOverflow=true&CountsAndLists=true&DisableResyncOnSDKServer=true&Example=true"
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=false&SplitControllerAndExtensions=false&FleetAllocationOverflow=false&CountsAndLists=true&DisableResyncOnSDKServer=true&Example=true"
testCluster="standard-e2e-test-cluster-${version//./-}"
else
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=false&SplitControllerAndExtensions=true&FleetAllocationOverflow=true&CountsAndLists=true&DisableResyncOnSDKServer=true&Example=true"
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=false&SplitControllerAndExtensions=true&FleetAllocationOverflow=false&CountsAndLists=true&DisableResyncOnSDKServer=true&Example=true"
testCluster="gke-autopilot-e2e-test-cluster-${version//./-}"
fi
featureWithoutGate=""
Expand Down
16 changes: 8 additions & 8 deletions examples/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ spec:
maxSurge: 25%
# the amount to decrements GameServers by. Defaults to 25%
maxUnavailable: 25%
# [Stage:Alpha]
# [Stage:Beta]
# [FeatureFlag:FleetAllocationOverflow]
# Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers exceeds
# the desired replicas in the underlying `GameServerSet`
# Commented out since Alpha, and disabled by default
# allocationOverflow:
# labels:
# mykey: myvalue
# version: "" # empty an existing label value
# annotations:
# otherkey: setthisvalue
# Now in Beta, and enabled by default
allocationOverflow:
labels:
mykey: myvalue
version: "" # empty an existing label value
annotations:
otherkey: setthisvalue
#
# [Stage:Alpha]
# [FeatureFlag:CountsAndLists]
Expand Down
2 changes: 1 addition & 1 deletion install/helm/agones/defaultfeaturegates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
# Default values for feature gates. Keep in sync with pkg/util/runtime/features.go:featureDefaults

# Beta features
FleetAllocationOverflow: true
ResetMetricsOnDelete: true
SplitControllerAndExtensions: true

# Alpha features
PlayerAllocationFilter: false
PlayerTracking: false
FleetAllocationOverflow: false
DisableResyncOnSDKServer: false

# Pre-Alpha features
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/agones/v1/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type FleetList struct {
type FleetSpec struct {
// Replicas are the number of GameServers that should be in this set. Defaults to 0.
Replicas int32 `json:"replicas"`
// [Stage: Alpha]
// [Stage: Beta]
// [FeatureFlag:FleetAllocationOverflow]
// Labels and/or Annotations to apply to overflowing GameServers when the number of Allocated GameServers is more
// than the desired replicas on the underlying `GameServerSet`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/agones/v1/gameserverset.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type GameServerSetList struct {
type GameServerSetSpec struct {
// Replicas are the number of GameServers that should be in this set
Replicas int32 `json:"replicas"`
// [Stage: Alpha]
// [Stage: Beta]
// [FeatureFlag:FleetAllocationOverflow]
// Labels and Annotations to apply to GameServers when the number of Allocated GameServers drops below
// the desired replicas on the underlying `GameServerSet`
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/runtime/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ var (
// In each of these, keep the feature sorted by descending maturity then alphabetical
featureDefaults = map[Feature]bool{
// Beta features
FeatureFleetAllocateOverflow: true,
FeatureResetMetricsOnDelete: true,
FeatureSplitControllerAndExtensions: true,

// Alpha features
FeatureFleetAllocateOverflow: false,
FeaturePlayerAllocationFilter: false,
FeaturePlayerTracking: false,
FeatureDisableResyncOnSDKServer: false,
Expand Down
4 changes: 2 additions & 2 deletions site/content/en/docs/Guides/feature-stages.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ The current set of `alpha` and `beta` feature gates:
{{% feature publishVersion="1.37.0" %}}
| Feature Name | Gate | Default | Stage | Since |
|-----------------------------------------------------------------------------------------------------------------------|--------------------------------|----------|---------|--------|
| [Allocated GameServers are notified on relevant Fleet Updates][fleet-updates] | `FleetAllocationOverflow` | Enabled | `Beta` | 1.37.0 |
| [Reset Metric Export on Fleet / Autoscaler deletion]({{% relref "./metrics.md#dropping-metric-labels" %}}) | `ResetMetricsOnDelete` | Enabled | `Beta` | 1.32.0 |
| [Split `agones-controller` ](https://github.com/googleforgames/agones/issues/2797) | `SplitControllerAndExtensions` | Enabled | `Beta` | 1.32.0 |
| [GameServer player capacity filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `PlayerAllocationFilter` | Disabled | `Alpha` | 1.14.0 |
| [Player Tracking]({{< ref "/docs/Guides/player-tracking.md" >}}) | `PlayerTracking` | Disabled | `Alpha` | 1.6.0 |
| [Allocated GameServers are notified on relevant Fleet Updates][fleet-updates] | `FleetAllocationOverflow` | Disabled | `Alpha` | 1.32.0 |
| [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Disabled | `Alpha` | 1.37.0 |
| [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Disabled | `Alpha` | 1.37.0 |
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
{{% /feature %}}

Expand Down
6 changes: 6 additions & 0 deletions site/content/en/docs/Guides/fleet-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,13 @@ the rate that you deem fit for your specific rollout.

## Notifying GameServers on Fleet Update/Downscale

{{% feature expiryVersion="1.37.0" %}}
{{< alpha title="Allocated GameSever Overflow Notification" gate="FleetAllocationOverflow" >}}
{{% /feature %}}

{{% feature publishVersion="1.37.0" %}}
{{< beta title="Allocated GameSever Overflow Notification" gate="FleetAllocationOverflow" >}}
{{% /feature %}}

When `Allocated` `GameServers` are utilised for a long time, such as a Lobby `GameServer`,
or a `GameServer` that is being reused multiple times in a row, it can be useful
Expand Down
Loading

0 comments on commit ddadfe7

Please sign in to comment.