Skip to content

Commit

Permalink
Merge branch 'main' into golangci-lint-version-update
Browse files Browse the repository at this point in the history
  • Loading branch information
gongmax authored Oct 2, 2024
2 parents 4903d49 + 4359a68 commit 5dc238d
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ KIND_CONTAINER_NAME=$(KIND_PROFILE)-control-plane
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.35

# Enable all beta feature gates. Keep in sync with `true` (beta) entries in pkg/util/runtime/features.go:featureDefaults
BETA_FEATURE_GATES ?= "AutopilotPassthroughPort=true&CountsAndLists=true&DisableResyncOnSDKServer=true"
BETA_FEATURE_GATES ?= "AutopilotPassthroughPort=true&CountsAndLists=true&DisableResyncOnSDKServer=true&GKEAutopilotExtendedDurationPods=true"

# 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&RollingUpdateFix=true&PortRanges=true&PortPolicyNone=true&ScheduledAutoscaler=true&Example=true"
Expand Down
5 changes: 2 additions & 3 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,11 @@ steps:
declare -A versionsAndRegions=( [1.28]=us-west1 [1.29]=europe-west1 [1.30]=asia-east1 )
# Keep in sync with (the inverse of) pkg/util/runtime/features.go:featureDefaults
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&CountsAndLists=false&RollingUpdateFix=true&PortRanges=true&PortPolicyNone=true&ScheduledAutoscaler=true&DisableResyncOnSDKServer=false&AutopilotPassthroughPort=false&Example=true"
featureWithGate="PlayerAllocationFilter=true&PlayerTracking=true&CountsAndLists=false&RollingUpdateFix=true&PortRanges=true&PortPolicyNone=true&ScheduledAutoscaler=true&DisableResyncOnSDKServer=false&AutopilotPassthroughPort=false&GKEAutopilotExtendedDurationPods=false&Example=true"
featureWithoutGate=""
# Use this if specific feature gates can only be supported on specific Kubernetes versions.
# TODO: When 1.28 becomes trailing version, promote GKEAutopilotExtendedDurationPods to beta.
declare -A featureWithGateByVersion=( [1.28]="${featureWithGate}&GKEAutopilotExtendedDurationPods=true" [1.29]="${featureWithGate}&GKEAutopilotExtendedDurationPods=true" [1.30]="${featureWithGate}&GKEAutopilotExtendedDurationPods=true")
declare -A featureWithGateByVersion=( [1.28]="${featureWithGate}" [1.29]="${featureWithGate}" [1.30]="${featureWithGate}")
for cloudProduct in ${cloudProducts[@]}
do
Expand Down
1 change: 1 addition & 0 deletions cmd/controller/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build profile
// +build profile

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/extensions/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build profile
// +build profile

package main
Expand Down
1 change: 1 addition & 0 deletions examples/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ spec:
# - "Info" (default) The SDK server will output all messages except for debug messages
# - "Debug" The SDK server will output all messages including debug messages
# - "Error" The SDK server will only output error messages
# - "Trace" The SDK server will output all messages, including detailed tracing information
logLevel: Info
#
# [Stage:Beta]
Expand Down
1 change: 1 addition & 0 deletions examples/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ spec:
# - "Info" (default) The SDK server will output all messages except for debug messages
# - "Debug" The SDK server will output all messages including debug messages
# - "Error" The SDK server will only output error messages
# - "Trace" The SDK server will output all messages, including detailed tracing information
logLevel: Info
# grpcPort and httpPort control what ports the sdkserver listens on.
# Starting with Agones 1.2 the default grpcPort is 9357 and the default
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,12 +15,12 @@
# Default values for feature gates. Keep in sync with pkg/util/runtime/features.go:featureDefaults

# Beta features
GKEAutopilotExtendedDurationPods: true
AutopilotPassthroughPort: true
CountsAndLists: true
DisableResyncOnSDKServer: true

# Alpha features
GKEAutopilotExtendedDurationPods: false
PlayerAllocationFilter: false
PlayerTracking: false
RollingUpdateFix: false
Expand Down
2 changes: 2 additions & 0 deletions install/helm/agones/templates/crds/_gameserverspecschema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,12 @@ properties:
- "Info" (default) The SDK server will output all messages except for debug messages
- "Debug" The SDK server will output all messages including debug messages
- "Error" The SDK server will only output error messages
- "Trace" The SDK server will output all messages, including detailed tracing information
enum:
- Error
- Info
- Debug
- Trace
grpcPort:
title: The port on which the SDK server binds the gRPC server to accept incoming connections
description: |
Expand Down
6 changes: 6 additions & 0 deletions install/yaml/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5563,10 +5563,12 @@ spec:
- "Info" (default) The SDK server will output all messages except for debug messages
- "Debug" The SDK server will output all messages including debug messages
- "Error" The SDK server will only output error messages
- "Trace" The SDK server will output all messages, including detailed tracing information
enum:
- Error
- Info
- Debug
- Trace
grpcPort:
title: The port on which the SDK server binds the gRPC server to accept incoming connections
description: |
Expand Down Expand Up @@ -11132,10 +11134,12 @@ spec:
- "Info" (default) The SDK server will output all messages except for debug messages
- "Debug" The SDK server will output all messages including debug messages
- "Error" The SDK server will only output error messages
- "Trace" The SDK server will output all messages, including detailed tracing information
enum:
- Error
- Info
- Debug
- Trace
grpcPort:
title: The port on which the SDK server binds the gRPC server to accept incoming connections
description: |
Expand Down Expand Up @@ -16823,10 +16827,12 @@ spec:
- "Info" (default) The SDK server will output all messages except for debug messages
- "Debug" The SDK server will output all messages including debug messages
- "Error" The SDK server will only output error messages
- "Trace" The SDK server will output all messages, including detailed tracing information
enum:
- Error
- Info
- Debug
- Trace
grpcPort:
title: The port on which the SDK server binds the gRPC server to accept incoming connections
description: |
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/agones/v1/gameserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ const (
SdkServerLogLevelDebug SdkServerLogLevel = "Debug"
// SdkServerLogLevelError will cause the SDK server to only output error messages.
SdkServerLogLevelError SdkServerLogLevel = "Error"
// SdkServerLogLevelTrace will cause the SDK server to output all messages, including detailed tracing information.
SdkServerLogLevelTrace SdkServerLogLevel = "Trace"
)

const (
Expand Down
28 changes: 14 additions & 14 deletions pkg/util/runtime/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const (
////////////////
// Beta features

// FeatureGKEAutopilotExtendedDurationPods enables the use of Extended Duration pods
// when Agones is running on Autopilot. Available on 1.28+ only.
FeatureGKEAutopilotExtendedDurationPods = "GKEAutopilotExtendedDurationPods"

// FeatureAutopilotPassthroughPort is a feature flag that enables/disables Passthrough Port Policy.
FeatureAutopilotPassthroughPort Feature = "AutopilotPassthroughPort"

Expand All @@ -44,10 +48,6 @@ const (
////////////////
// Alpha features

// FeatureGKEAutopilotExtendedDurationPods enables the use of Extended Duration pods
// when Agones is running on Autopilot. Available on 1.28+ only.
FeatureGKEAutopilotExtendedDurationPods = "GKEAutopilotExtendedDurationPods"

// FeaturePlayerAllocationFilter is a feature flag that enables the ability for Allocations to filter based on
// player capacity.
FeaturePlayerAllocationFilter Feature = "PlayerAllocationFilter"
Expand Down Expand Up @@ -128,18 +128,18 @@ var (
// In each of these, keep the feature sorted by descending maturity then alphabetical
featureDefaults = map[Feature]bool{
// Beta features
FeatureAutopilotPassthroughPort: true,
FeatureCountsAndLists: true,
FeatureDisableResyncOnSDKServer: true,
FeatureGKEAutopilotExtendedDurationPods: true,
FeatureAutopilotPassthroughPort: true,
FeatureCountsAndLists: true,
FeatureDisableResyncOnSDKServer: true,

// Alpha features
FeatureGKEAutopilotExtendedDurationPods: false,
FeaturePlayerAllocationFilter: false,
FeaturePlayerTracking: false,
FeatureRollingUpdateFix: false,
FeaturePortRanges: false,
FeaturePortPolicyNone: false,
FeatureScheduledAutoscaler: false,
FeaturePlayerAllocationFilter: false,
FeaturePlayerTracking: false,
FeatureRollingUpdateFix: false,
FeaturePortRanges: false,
FeaturePortPolicyNone: false,
FeatureScheduledAutoscaler: false,

// Dev features

Expand Down
2 changes: 1 addition & 1 deletion site/content/en/docs/Getting Started/create-gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Kind: GameServer
Metadata:
Creation Timestamp: 2019-02-27T15:06:20Z
Finalizers:
agones.dev
agones.dev/controller
Generate Name: simple-game-server-
Generation: 1
Resource Version: 30377
Expand Down
21 changes: 20 additions & 1 deletion site/content/en/docs/Guides/feature-stages.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ that can be found in the [Helm configuration]({{< ref "/docs/Installation/Instal

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


{{% feature expiryVersion="1.44.0" %}}

| Feature Name | Gate | Default | Stage | Since |
|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|---------|--------|
Expand All @@ -40,6 +40,25 @@ The current set of `alpha` and `beta` feature gates:
| [Scheduled Fleet Autoscaling](https://github.com/googleforgames/agones/issues/3008) | `ScheduledAutoscaler` | Disabled | `Alpha` | 1.43.0 |
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |

{{% /feature %}}

{{% feature publishVersion="1.44.0" %}}

| Feature Name | Gate | Default | Stage | Since |
|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|---------|--------|
| [CountsAndLists](https://github.com/googleforgames/agones/issues/2716) | `CountsAndLists` | Enabled | `Beta` | 1.41.0 |
| [DisableResyncOnSDKServer](https://github.com/googleforgames/agones/issues/3377) | `DisableResyncOnSDKServer` | Enabled | `Beta` | 1.40.0 |
| [Support Passthrough on GKE Autopilot](https://github.com/googleforgames/agones/issues/3721) | `AutopilotPassthroughPort` | Enabled | `Beta` | 1.43.0 |
| [Support for Extended Duration Pods on GKE Autopilot (*1.28+ only*)](https://github.com/googleforgames/agones/issues/3386) | `GKEAutopilotExtendedDurationPods` | Enabled | `Beta` | 1.44.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 |
| [Rolling Update Fixes](https://github.com/googleforgames/agones/issues/3688) | `RollingUpdateFix` | Disabled | `Alpha` | 1.41.0 |
| [Multiple dynamic port ranges](https://github.com/googleforgames/agones/issues/1911) | `PortRanges` | Disabled | `Alpha` | 1.41.0 |
| [Port Policy None](https://github.com/googleforgames/agones/issues/3804) | `PortPolicyNone` | Disabled | `Alpha` | 1.41.0 |
| [Scheduled Fleet Autoscaling](https://github.com/googleforgames/agones/issues/3008) | `ScheduledAutoscaler` | Disabled | `Alpha` | 1.43.0 |
| Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 |

{{% /feature %}}

[fleet-updates]: {{% relref "./fleet-updates.md#notifying-gameservers-on-fleet-updatedownscale" %}}

Expand Down
2 changes: 2 additions & 0 deletions site/content/en/docs/Reference/gameserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
# - "Info" (default) The SDK server will output all messages except for debug messages
# - "Debug" The SDK server will output all messages including debug messages
# - "Error" The SDK server will only output error messages
# - "Trace" The SDK server will output all messages, including detailed tracing information
logLevel: Info
# grpcPort and httpPort control what ports the sdkserver listens on.
# Starting with Agones 1.2 the default grpcPort is 9357 and the default
Expand Down Expand Up @@ -146,6 +147,7 @@ The `spec` field is the actual GameServer specification and it is composed as fo
- "Info" (default) The SDK server will output all messages except for debug messages
- "Debug" The SDK server will output all messages including debug messages
- "Error" The SDK server will only output error messages
- "Trace" The SDK server will output all messages, including detailed tracing information
- `grpcPort` the port that the SDK Server binds to for gRPC connections
- `httpPort` the port that the SDK Server binds to for HTTP gRPC gateway connections
- `players` (Alpha, behind "PlayerTracking" feature gate), sets this GameServer's initial player capacity
Expand Down

0 comments on commit 5dc238d

Please sign in to comment.