Skip to content

Commit ae82300

Browse files
authored
feat(autoscaler): Promote WasmAutoscaler feature from Dev to Alpha stage (#4308)
* feat(autoscaler): Promote WasmAutoscaler feature from Dev to Alpha stage This commit promotes the WasmAutoscaler feature to Alpha and includes: - Feature gate enablement across all relevant files. - API tweaks to improve generated reference documentation. - Added WasmAutoscaler to feature stages table (version 1.53.0) - Comprehensive e2e test suite. Work on #4080 * * Updated feature map * Updated versionMap.yaml
1 parent 6ed456e commit ae82300

10 files changed

Lines changed: 276 additions & 18 deletions

File tree

build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ BETA_FEATURE_GATES ?= "AutopilotPassthroughPort=true&CountsAndLists=true&GKEAuto
7373

7474

7575
# Enable all alpha feature gates. Keep in sync with `false` (alpha) entries in pkg/util/runtime/features.go:featureDefaults
76-
ALPHA_FEATURE_GATES ?= "PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=true&PlayerTracking=true&SidecarContainers=true&Example=true"
76+
ALPHA_FEATURE_GATES ?= "PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=true&PlayerTracking=true&SidecarContainers=true&WasmAutoscaler=true&Example=true"
7777

7878
# Build with Windows support
7979
WITH_WINDOWS=1

cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ steps:
308308
309309
# Keep in sync with the inverse of 'alpha' and 'beta' features in
310310
# pkg/util/runtime/features.go:featureDefaults
311-
featureWithGate="PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=true&PlayerTracking=true&CountsAndLists=false&RollingUpdateFix=false&PortRanges=false&PortPolicyNone=false&ScheduledAutoscaler=false&AutopilotPassthroughPort=false&GKEAutopilotExtendedDurationPods=false&SidecarContainers=true&Example=true"
311+
featureWithGate="PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=true&PlayerTracking=true&CountsAndLists=false&RollingUpdateFix=false&PortRanges=false&PortPolicyNone=false&ScheduledAutoscaler=false&AutopilotPassthroughPort=false&GKEAutopilotExtendedDurationPods=false&SidecarContainers=true&WasmAutoscaler=true&Example=true"
312312
featureWithoutGate=""
313313
314314
# Use this if specific feature gates can only be supported on specific Kubernetes versions.

install/helm/agones/defaultfeaturegates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ FleetAutoscaleRequestMetaData: false
3434
PlayerAllocationFilter: false
3535
PlayerTracking: false
3636
SidecarContainers: false
37+
WasmAutoscaler: false
3738

3839
# Dev features
3940
ProcessorAllocator: false
40-
WasmAutoscaler: false
4141

4242
# Example feature
4343
Example: false

pkg/apis/autoscaling/v1/fleetautoscaler.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ const (
147147
// nolint:revive // Linter contains comment doesn't start with ChainPolicyType
148148
ChainPolicyType FleetAutoscalerPolicyType = "Chain"
149149
// WasmPolicyType is for WebAssembly based fleet autoscaling
150-
// [Stage:Dev]
150+
// [Stage:Alpha]
151151
// [FeatureFlag:WasmAutoscaler]
152152
WasmPolicyType FleetAutoscalerPolicyType = "Wasm"
153153
// FixedIntervalSyncType is a simple fixed interval based strategy for trigger autoscaling
@@ -299,6 +299,7 @@ type WasmPolicy struct {
299299
// WasmFrom defines the source of the Wasm module
300300
From WasmFrom `json:"from"`
301301
// Hash of the Wasm module, used to verify the integrity of the module
302+
// +optional
302303
Hash string `json:"hash,omitempty"`
303304
}
304305

pkg/sdkserver/sdkserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ func (s *SDKServer) RemoveListValue(ctx context.Context, in *beta.RemoveListValu
12131213

12141214
// Track this removal for batch persistence to K8s
12151215
batchList := s.gsListUpdates[in.Name]
1216-
1216+
12171217
removedFromBatch := false
12181218
if len(batchList.valuesToAppend) > 0 {
12191219
newAppend := make([]string, 0, len(batchList.valuesToAppend))

pkg/util/runtime/features.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ const (
7676
// FeatureSidecarContainers is a feature flag to enable/disable k8s sidecar containers for the sdkserver
7777
FeatureSidecarContainers = "SidecarContainers"
7878

79+
// FeatureWasmAutoscaler is a feature flag to enable/disable the script based autoscaler.
80+
FeatureWasmAutoscaler Feature = "WasmAutoscaler"
81+
7982
////////////////
8083
// Dev features
8184

8285
// FeatureProcessorAllocator is a feature flag to enable/disable the processor allocator feature.
8386
FeatureProcessorAllocator = "ProcessorAllocator"
8487

85-
// FeatureWasmAutoscaler is a feature flag to enable/disable the script based autoscaler.
86-
FeatureWasmAutoscaler Feature = "WasmAutoscaler"
87-
8888
////////////////
8989
// Example feature
9090

@@ -166,10 +166,10 @@ var (
166166
FeaturePlayerAllocationFilter: false,
167167
FeaturePlayerTracking: false,
168168
FeatureSidecarContainers: false,
169+
FeatureWasmAutoscaler: false,
169170

170171
// Dev features
171172
FeatureProcessorAllocator: false,
172-
FeatureWasmAutoscaler: false,
173173

174174
// Example feature
175175
FeatureExample: false,

site/content/en/docs/Guides/feature-stages.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,28 @@ be disabled.
2626

2727
The current set of `alpha` and `beta` feature gates:
2828

29+
{{% feature publishVersion="1.54.0" %}}
2930

31+
| Feature Name | Gate | Default | Stage | Since |
32+
|----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|----------|--------|
33+
| [CountsAndLists](https://github.com/googleforgames/agones/issues/2716) | `CountsAndLists` | Enabled | `Beta` | 1.41.0 |
34+
| [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Enabled | `Stable` | 1.49.0 |
35+
| [Support Passthrough on GKE Autopilot](https://github.com/googleforgames/agones/issues/3721) | `AutopilotPassthroughPort` | Enabled | `Beta` | 1.43.0 |
36+
| [Support for Extended Duration Pods on GKE Autopilot (*1.28+ only*)](https://github.com/googleforgames/agones/issues/3386) | `GKEAutopilotExtendedDurationPods` | Enabled | `Beta` | 1.44.0 |
37+
| [Port Policy None](https://github.com/googleforgames/agones/issues/3804) | `PortPolicyNone` | Enabled | `Beta` | 1.49.0 |
38+
| [Multiple dynamic port ranges](https://github.com/googleforgames/agones/issues/1911) | `PortRanges` | Enabled | `Beta` | 1.49.0 |
39+
| [Rolling Update Fixes](https://github.com/googleforgames/agones/issues/3688) | `RollingUpdateFix` | Enabled | `Beta` | 1.50.0 |
40+
| [GameServer player capacity filtering on GameServerAllocations](https://github.com/googleforgames/agones/issues/1239) | `PlayerAllocationFilter` | Disabled | `Alpha` | 1.14.0 |
41+
| [Player Tracking]({{< ref "/docs/Guides/player-tracking.md" >}}) | `PlayerTracking` | Disabled | `Alpha` | 1.6.0 |
42+
| [Scheduled Fleet Autoscaling](https://github.com/googleforgames/agones/issues/3008) | `ScheduledAutoscaler` | Enabled | `Beta` | 1.51.0 |
43+
| [Extend Webhook autoscaler to send fleet metadata with the request](https://github.com/googleforgames/agones/issues/3951) | `FleetAutoscaleRequestMetaData` | Disabled | `Alpha` | 1.48.0 |
44+
| [Sidecar Containers](https://github.com/googleforgames/agones/issues/3642) | `SidecarContainers` | Disabled | `Alpha` | 1.49.0 |
45+
| [Wasm Autoscaler](https://github.com/googleforgames/agones/issues/4080) | `WasmAutoscaler` | Disabled | `Alpha` | 1.54.0 |
46+
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
47+
48+
{{% /feature %}}
49+
50+
{{% feature expiryVersion="1.54.0" %}}
3051

3152
| Feature Name | Gate | Default | Stage | Since |
3253
|----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|----------|--------|
@@ -44,6 +65,8 @@ The current set of `alpha` and `beta` feature gates:
4465
| [Sidecar Containers](https://github.com/googleforgames/agones/issues/3642) | `SidecarContainers` | Disabled | `Alpha` | 1.49.0 |
4566
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |
4667

68+
{{% /feature %}}
69+
4770
[fleet-updates]: {{% relref "./fleet-updates.md#notifying-gameservers-on-fleet-updatedownscale" %}}
4871

4972
{{< alert title="Note" color="info" >}}

site/content/en/docs/Reference/agones_crd_api_reference.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9076,7 +9076,7 @@ <h3 id="autoscaling.agones.dev/v1.FleetAutoscalerPolicyType">FleetAutoscalerPoli
90769076
</td>
90779077
</tr><tr><td><p>&#34;Wasm&#34;</p></td>
90789078
<td><p>WasmPolicyType is for WebAssembly based fleet autoscaling
9079-
[Stage:Dev]
9079+
[Stage:Alpha]
90809080
[FeatureFlag:WasmAutoscaler]</p>
90819081
</td>
90829082
</tr><tr><td><p>&#34;Webhook&#34;</p></td>
@@ -9605,6 +9605,7 @@ <h3 id="autoscaling.agones.dev/v1.WasmPolicy">WasmPolicy
96059605
</em>
96069606
</td>
96079607
<td>
9608+
<em>(Optional)</em>
96089609
<p>Hash of the Wasm module, used to verify the integrity of the module</p>
96099610
</td>
96109611
</tr>

0 commit comments

Comments
 (0)