diff --git a/build/Makefile b/build/Makefile index ccb5a80593..c7e0006dab 100644 --- a/build/Makefile +++ b/build/Makefile @@ -70,7 +70,7 @@ GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.3 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" +ALPHA_FEATURE_GATES ?= "PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=true&PlayerTracking=true&RollingUpdateFix=true&PortRanges=true&PortPolicyNone=true&ScheduledAutoscaler=true&Example=true" # Build with Windows support WITH_WINDOWS=1 @@ -514,9 +514,8 @@ build-required-src-dist: # According to the docker documentation, to build the images for ARM64 arch CPU # we would need to use buildx command which uses builder https://docs.docker.com/desktop/multi-arch/ # We primarily need this for M1 Macs, see: https://medium.com/geekculture/docker-build-with-mac-m1-d668c802ab96 -# Making this command optional (using - as prefix) because it will fail once built for the first time, so we ignore failures. create-arm64-builder: - -docker buildx create --name $(BUILDX_ARM64_BUILDER) + docker buildx use $(BUILDX_ARM64_BUILDER) || docker buildx create --name $(BUILDX_ARM64_BUILDER) --use # Build the image for the gameserver controller build-controller-image: build-controller-image-amd64 @@ -570,8 +569,8 @@ build-agones-sdk-binary-windows: $(ensure-build-image) $(GO_BUILD_WINDOWS_AMD64) \ -o $(go_build_base_path)/cmd/sdk-server/bin/sdk-server.windows.amd64.exe $(go_rebuild_flags) $(go_version_flags) $(agones_package)/cmd/sdk-server -ensure-windows-buildx-%: - -docker buildx create --name=$(BUILDX_WINDOWS_BUILDER)-$* +ensure-windows-buildx: + docker buildx use $(BUILDX_WINDOWS_BUILDER) || docker buildx create --platform windows/amd64 --name $(BUILDX_WINDOWS_BUILDER) --use # Build the image for the gameserver extensions build-extensions-image: build-extensions-image-amd64 @@ -618,8 +617,8 @@ build-agones-sdk-image-windows: build-agones-sdk-binary build-agones-sdk-image-windows: $(foreach winver, $(WINDOWS_VERSIONS), build-agones-sdk-image-windows-$(winver)) # Build the image for the gameserver sidecar and SDK binaries -build-agones-sdk-image-windows-%: $(ensure-build-image) build-agones-sdk-binary build-licenses build-required-src-dist ensure-windows-buildx-% - docker buildx build --platform windows/amd64 --builder $(BUILDX_WINDOWS_BUILDER)-$* -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* --build-arg IMAGE_TAG=$(if $(filter ltsc2019,$*),$(LTSC2019_IMAGE_TAG)) $(DOCKER_BUILD_ARGS) $(agones_path)/cmd/sdk-server/ $(WINDOWS_DOCKER_PUSH_ARGS) +build-agones-sdk-image-windows-%: $(ensure-build-image) build-agones-sdk-binary build-licenses build-required-src-dist ensure-windows-buildx + docker buildx build --platform windows/amd64 --builder $(BUILDX_WINDOWS_BUILDER) -f $(agones_path)/cmd/sdk-server/Dockerfile.windows --tag=$(sidecar_tag)-windows_amd64-$* --build-arg WINDOWS_VERSION=$* --build-arg IMAGE_TAG=$(if $(filter ltsc2019,$*),$(LTSC2019_IMAGE_TAG)) $(DOCKER_BUILD_ARGS) $(agones_path)/cmd/sdk-server/ $(WINDOWS_DOCKER_PUSH_ARGS) # Build a static binary for the ping service build-ping-binary: build-ping-binary-amd64 diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 504f65a69c..643e75ddb2 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -440,7 +440,7 @@ steps: declare -A versionsAndRegions=( [1.29]=europe-west1 [1.30]=asia-east1 [1.31]=us-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&GKEAutopilotExtendedDurationPods=false&Example=true" + featureWithGate="PlayerAllocationFilter=true&FleetAutoscaleRequestMetaData=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. diff --git a/install/helm/agones/defaultfeaturegates.yaml b/install/helm/agones/defaultfeaturegates.yaml index 36eb5c1b75..1528804e7d 100644 --- a/install/helm/agones/defaultfeaturegates.yaml +++ b/install/helm/agones/defaultfeaturegates.yaml @@ -21,6 +21,7 @@ CountsAndLists: true DisableResyncOnSDKServer: true # Alpha features +FleetAutoscaleRequestMetaData: false PlayerAllocationFilter: false PlayerTracking: false RollingUpdateFix: false diff --git a/install/helm/agones/templates/ping.yaml b/install/helm/agones/templates/ping.yaml index c52016fd04..75bb874556 100644 --- a/install/helm/agones/templates/ping.yaml +++ b/install/helm/agones/templates/ping.yaml @@ -158,6 +158,12 @@ metadata: spec: selector: agones.dev/role: ping +{{- if .Values.agones.ping.http.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.ping.http.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.ping.http.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.ping.http.ipFamilies | nindent 4 }} +{{- end }} ports: - port: {{ .Values.agones.ping.http.port }} name: http @@ -199,6 +205,12 @@ metadata: spec: selector: agones.dev/role: ping +{{- if .Values.agones.ping.udp.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.ping.udp.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.ping.udp.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.ping.udp.ipFamilies | nindent 4 }} +{{- end }} ports: - port: {{ .Values.agones.ping.udp.port }} name: udp diff --git a/install/helm/agones/templates/service/allocation.yaml b/install/helm/agones/templates/service/allocation.yaml index 8c538029f8..766f2fef78 100644 --- a/install/helm/agones/templates/service/allocation.yaml +++ b/install/helm/agones/templates/service/allocation.yaml @@ -33,6 +33,12 @@ metadata: spec: selector: multicluster.agones.dev/role: allocator +{{- if .Values.agones.allocator.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ .Values.agones.allocator.service.ipFamilyPolicy }} +{{- end }} +{{- if .Values.agones.allocator.service.ipFamilies }} + ipFamilies: {{ toYaml .Values.agones.allocator.service.ipFamilies | nindent 4 }} +{{- end }} ports: {{- if .Values.agones.allocator.service.http.enabled }} - port: {{ .Values.agones.allocator.service.http.port }} diff --git a/install/helm/agones/values.yaml b/install/helm/agones/values.yaml index b64eb21eff..11dfb04c31 100644 --- a/install/helm/agones/values.yaml +++ b/install/helm/agones/values.yaml @@ -187,6 +187,8 @@ agones: externalTrafficPolicy: Cluster loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] udp: expose: true rateLimit: 20 @@ -197,6 +199,8 @@ agones: externalTrafficPolicy: Cluster loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] healthCheck: initialDelaySeconds: 3 periodSeconds: 3 @@ -240,6 +244,8 @@ agones: loadBalancerIP: "" loadBalancerSourceRanges: [] annotations: {} + ipFamilyPolicy: "" + ipFamilies: [] http: enabled: true appProtocol: "" diff --git a/pkg/apis/autoscaling/v1/fleetautoscaler.go b/pkg/apis/autoscaling/v1/fleetautoscaler.go index 14e96c4447..d8db0f3434 100644 --- a/pkg/apis/autoscaling/v1/fleetautoscaler.go +++ b/pkg/apis/autoscaling/v1/fleetautoscaler.go @@ -316,6 +316,10 @@ type FleetAutoscaleRequest struct { Namespace string `json:"namespace"` // The Fleet's status values Status agonesv1.FleetStatus `json:"status"` + // Standard map labels; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels. + Labels map[string]string `json:"labels,omitempty"` + // Standard map annotations; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations. + Annotations map[string]string `json:"annotations,omitempty"` } // FleetAutoscaleResponse defines the response of webhook autoscaler endpoint diff --git a/pkg/fleetautoscalers/fleetautoscalers.go b/pkg/fleetautoscalers/fleetautoscalers.go index 0e7cc428ed..053bb29d37 100644 --- a/pkg/fleetautoscalers/fleetautoscalers.go +++ b/pkg/fleetautoscalers/fleetautoscalers.go @@ -172,6 +172,11 @@ func applyWebhookPolicy(w *autoscalingv1.WebhookPolicy, f *agonesv1.Fleet) (repl Response: nil, } + if runtime.FeatureEnabled(runtime.FeatureFleetAutoscaleRequestMetaData) { + faReq.Request.Annotations = f.ObjectMeta.Annotations + faReq.Request.Labels = f.ObjectMeta.Labels + } + b, err := json.Marshal(faReq) if err != nil { return 0, false, err diff --git a/pkg/fleetautoscalers/fleetautoscalers_test.go b/pkg/fleetautoscalers/fleetautoscalers_test.go index 5a67717363..a9c029164d 100644 --- a/pkg/fleetautoscalers/fleetautoscalers_test.go +++ b/pkg/fleetautoscalers/fleetautoscalers_test.go @@ -22,6 +22,7 @@ import ( "io" "net/http" "net/http/httptest" + "strconv" "testing" "time" @@ -92,6 +93,15 @@ func (t testServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { faResp.Replicas = faReq.Status.Replicas * scaleFactor } + // override value for tests + if faReq.Annotations != nil { + if value, ok := faReq.Annotations["fixedReplicas"]; ok { + faResp.Scale = true + replicas, _ := strconv.Atoi(value) + faResp.Replicas = int32(replicas) + } + } + review := &autoscalingv1.FleetAutoscaleReview{ Request: faReq, Response: &faResp, @@ -579,6 +589,41 @@ func TestApplyWebhookPolicy(t *testing.T) { } } +func TestApplyWebhookPolicyWithMetadata(t *testing.T) { + t.Parallel() + + utilruntime.FeatureTestMutex.Lock() + defer utilruntime.FeatureTestMutex.Unlock() + + err := utilruntime.ParseFeatures(string(utilruntime.FeatureFleetAutoscaleRequestMetaData) + "=true") + assert.NoError(t, err) + defer func() { + _ = utilruntime.ParseFeatures("") + }() + + ts := testServer{} + server := httptest.NewServer(ts) + defer server.Close() + + _, fleet := defaultWebhookFixtures() + + fixedReplicas := int32(11) + fleet.ObjectMeta.Annotations = map[string]string{ + "fixedReplicas": fmt.Sprintf("%d", fixedReplicas), + } + + webhookPolicy := &autoscalingv1.WebhookPolicy{ + Service: nil, + URL: &(server.URL), + } + + replicas, limited, err := applyWebhookPolicy(webhookPolicy, fleet) + + assert.Nil(t, err) + assert.False(t, limited) + assert.Equal(t, fixedReplicas, replicas) +} + func TestApplyWebhookPolicyNilFleet(t *testing.T) { t.Parallel() diff --git a/pkg/util/runtime/features.go b/pkg/util/runtime/features.go index fbbe49035c..e3a3ade6e2 100644 --- a/pkg/util/runtime/features.go +++ b/pkg/util/runtime/features.go @@ -48,6 +48,9 @@ const ( //////////////// // Alpha features + // FeatureFleetAutoscaleRequestMetaData is a feature flag that enables/disables fleet metadata on webhook autoscaler request. + FeatureFleetAutoscaleRequestMetaData Feature = "FleetAutoscaleRequestMetaData" + // FeaturePlayerAllocationFilter is a feature flag that enables the ability for Allocations to filter based on // player capacity. FeaturePlayerAllocationFilter Feature = "PlayerAllocationFilter" @@ -134,12 +137,13 @@ var ( FeatureDisableResyncOnSDKServer: true, // Alpha features - FeaturePlayerAllocationFilter: false, - FeaturePlayerTracking: false, - FeatureRollingUpdateFix: false, - FeaturePortRanges: false, - FeaturePortPolicyNone: false, - FeatureScheduledAutoscaler: false, + FeatureFleetAutoscaleRequestMetaData: false, + FeaturePlayerAllocationFilter: false, + FeaturePlayerTracking: false, + FeatureRollingUpdateFix: false, + FeaturePortRanges: false, + FeaturePortPolicyNone: false, + FeatureScheduledAutoscaler: false, // Dev features diff --git a/site/content/en/docs/Guides/feature-stages.md b/site/content/en/docs/Guides/feature-stages.md index 310e392147..fd0a8673e8 100644 --- a/site/content/en/docs/Guides/feature-stages.md +++ b/site/content/en/docs/Guides/feature-stages.md @@ -24,7 +24,25 @@ that can be found in the [Helm configuration]({{< ref "/docs/Installation/Instal The current set of `alpha` and `beta` feature gates: +{{% feature expiryVersion="1.48.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 %}} + +{{% feature publishVersion="1.48.0" %}} | Feature Name | Gate | Default | Stage | Since | |-----------------------------------------------------------------------------------------------------------------------------|------------------------------------|----------|---------|--------| @@ -38,8 +56,10 @@ The current set of `alpha` and `beta` feature gates: | [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 | +| [Extend Webhook autoscaler to send fleet metadata with the request](https://github.com/googleforgames/agones/issues/3951) | `FleetAutoscaleRequestMetaData` | Disabled | `Alpha` | 1.48.0 | | Example Gate (not in use) | `Example` | Disabled | None | 0.13.0 | +{{% /feature %}} [fleet-updates]: {{% relref "./fleet-updates.md#notifying-gameservers-on-fleet-updatedownscale" %}} diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 1bec44feb9..7b04f0ba65 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -200,6 +200,8 @@ The following tables lists the configurable parameters of the Agones chart and t ### Ping Service +{{% feature expiryVersion="1.48.0" %}} + | Parameter | Description | Default | |----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------| | `agones.ping.install` | Whether to install the [ping service][ping] | `true` | @@ -237,8 +239,115 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.ping.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage Mutually Exclusive with `minAvailable` | \`\` | | `agones.ping.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | +{{% /feature %}} +{{% feature publishVersion="1.48.0" %}} + +| Parameter | Description | Default | +|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------| +| `agones.ping.install` | Whether to install the [ping service][ping] | `true` | +| `agones.ping.replicas` | The number of replicas to run in the deployment | `2` | +| `agones.ping.http.expose` | Expose the http ping service via a Service | `true` | +| `agones.ping.http.response` | The string response returned from the http service | `ok` | +| `agones.ping.http.port` | The port to expose on the service | `80` | +| `agones.ping.http.serviceType` | The [Service Type][service] of the HTTP Service | `LoadBalancer` | +| `agones.ping.http.nodePort` | Static node port to use for HTTP ping service. (Only applies when `agones.ping.http.serviceType` is `NodePort`.) | `0` | +| `agones.ping.http.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.http.externalTrafficPolicy` | The `externalTrafficPolicy` for the Agones http ping service | `Cluster` | +| `agones.ping.http.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the HTTP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | +| `agones.ping.http.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.http.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | +| `agones.ping.http.annotations` | [Annotations][annotations] added to the Agones ping http service | `{}` | +| `agones.ping.udp.expose` | Expose the udp ping service via a Service | `true` | +| `agones.ping.udp.rateLimit` | Number of UDP packets the ping service handles per instance, per second, per sender | `20` | +| `agones.ping.udp.port` | The port to expose on the service | `80` | +| `agones.ping.udp.serviceType` | The [Service Type][service] of the UDP Service | `LoadBalancer` | +| `agones.ping.udp.nodePort` | Static node port to use for UDP ping service. (Only applies when `agones.ping.udp.serviceType` is `NodePort`.) | `0` | +| `agones.ping.udp.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.udp.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the UDP Service load balancer. Only works if the Kubernetes provider supports this option. | `[]` | +| `agones.ping.udp.annotations` | [Annotations][annotations] added to the Agones ping udp service | `{}` | +| `agones.ping.udp.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.ping.udp.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | +| `agones.ping.healthCheck.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` | +| `agones.ping.healthCheck.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` | +| `agones.ping.healthCheck.failureThreshold` | Number of times before giving up (in seconds) | `3` | +| `agones.ping.healthCheck.timeoutSeconds` | Number of seconds after which the probe times out (in seconds) | `1` | +| `agones.ping.resources` | Ping pods [resource requests/limit][resources] | `{}` | +| `agones.ping.nodeSelector` | Ping [node labels][nodeSelector] for pod assignment | `{}` | +| `agones.ping.tolerations` | Ping [toleration][toleration] labels for pod assignment | `[]` | +| `agones.ping.affinity` | Ping [affinity][affinity] settings for pod assignment | `{}` | +| `agones.ping.annotations` | [Annotations][annotations] added to the Agones ping pods | `{}` | +| `agones.ping.updateStrategy` | The [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) to apply to the allocator deployment | `{}` | +| `agones.ping.pdb.enabled` | Set to `true` to enable the creation of a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for the ping deployment | `false` | +| `agones.ping.pdb.minAvailable` | Description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. Can be either an absolute number or a percentage. Mutually Exclusive with `maxUnavailable` | `1` | +| `agones.ping.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage Mutually Exclusive with `minAvailable` | \`\` | +| `agones.ping.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | + +{{% /feature %}} + ### Allocator Service +{{% feature expiryVersion="1.48.0" %}} + +| Parameter | Description | Default | +| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | +| `agones.allocator.apiServerQPS` | Maximum sustained queries per second that an allocator should be making against API Server | `400` | +| `agones.allocator.apiServerQPSBurst` | Maximum burst queries per second that an allocator should be making against API Server | `500` | +| `agones.allocator.remoteAllocationTimeout` | Remote allocation call timeout. | `10s` | +| `agones.allocator.totalRemoteAllocationTimeout` | Total remote allocation timeout including retries. | `30s` | +| `agones.allocator.logLevel` | Agones Allocator Log level. Log only entries with that severity and above | `info` | +| `agones.allocator.install` | Whether to install the [allocator service][allocator] | `true` | +| `agones.allocator.replicas` | The number of replicas to run in the deployment | `3` | +| `agones.allocator.service.name` | Service name for the allocator | `agones-allocator` | +| `agones.allocator.service.serviceType` | The [Service Type][service] of the HTTP Service | `LoadBalancer` | +| `agones.allocator.service.clusterIP` | The [Cluster IP][clusterIP] of the Agones allocator. If you want [Headless Service][headless-service] for Agones Allocator, you can set `None` to clusterIP. | \`\` | +| `agones.allocator.service.loadBalancerIP` | The [Load Balancer IP][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | \`\` | +| `agones.allocator.service.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | `[]` | +| `agones.allocator.service.annotations` | [Annotations][annotations] added to the Agones allocator service | `{}` | +| `agones.allocator.service.externalTrafficPolicy` | The `externalTrafficPolicy` for the Agones allocator service | `Cluster` | +| `agones.allocator.service.http.enabled` | If true the [allocator service][allocator] will respond to [REST requests][rest-requests] | `true` | +| `agones.allocator.service.http.appProtocol` | The `appProtocol` to set on the Service for the http allocation port. If left blank, no value is set. | `` | +| `agones.allocator.service.http.port` | The port that is exposed externally by the [allocator service][allocator] for [REST requests][rest-requests] | `443` | +| `agones.allocator.service.http.portName` | The name of exposed port | `http` | +| `agones.allocator.service.http.targetPort` | The port that is used by the allocator pod to listen for [REST requests][rest-requests]. Note that the allocator server cannot bind to low numbered ports. | `8443` | +| `agones.allocator.service.http.nodePort` | If the ServiceType is set to "NodePort", this is the NodePort that the allocator http service is exposed on. | `30000-32767` | +| `agones.allocator.service.http.unallocatedStatusCode` | HTTP status code to return when no GameServer is available for allocation. This setting allows for custom responses when a game server allocation fails, offering flexibility in handling these situations. | `429` | +| `agones.allocator.service.grpc.enabled` | If true the [allocator service][allocator] will respond to [gRPC requests][grpc-requests] | `true` | +| `agones.allocator.service.grpc.port` | The port that is exposed externally by the [allocator service][allocator] for [gRPC requests][grpc-requests] | `443` | +| `agones.allocator.service.grpc.portName` | The name of exposed port | `` | +| `agones.allocator.service.grpc.appProtocol` | The `appProtocol` to set on the Service for the gRPC allocation port. If left blank, no value is set. | `` | +| `agones.allocator.service.grpc.nodePort` | If the ServiceType is set to "NodePort", this is the NodePort that the allocator gRPC service is exposed on. | `30000-32767` | +| `agones.allocator.service.grpc.targetPort` | The port that is used by the allocator pod to listen for [gRPC requests][grpc-requests]. Note that the allocator server cannot bind to low numbered ports. | `8443` | +| `agones.allocator.generateClientTLS` | Set to true to generate client TLS certificates or false to provide certificates in `certs/allocator/allocator-client.default/*` | `true` | +| `agones.allocator.generateTLS` | Set to true to generate TLS certificates or false to provide your own certificates | `true` | +| `agones.allocator.disableMTLS` | Turns off client cert authentication for incoming connections to the allocator. | `false` | +| `agones.allocator.disableTLS` | Turns off TLS security for incoming connections to the allocator. | `false` | +| `agones.allocator.disableSecretCreation` | Disables the creation of any allocator secrets. If true, you MUST provide the `allocator-tls`, `allocator-tls-ca`, and `allocator-client-ca` secrets before installation. | `false` | +| `agones.allocator.tlsCert` | Custom TLS certificate provided as a string | \`\` | +| `agones.allocator.tlsKey` | Custom TLS private key provided as a string | \`\` | +| `agones.allocator.clientCAs` | A map of secret key names to allowed client CA certificates provided as strings | `{}` | +| `agones.allocator.tolerations` | Allocator [toleration][toleration] labels for pod assignment | `[]` | +| `agones.allocator.affinity` | Allocator [affinity][affinity] settings for pod assignment | `{}` | +| `agones.allocator.annotations` | [Annotations][annotations] added to the Agones allocator pods | `{}` | +| `agones.allocator.resources` | Allocator pods [resource requests/limit][resources] | `{}` | +| `agones.allocator.labels` | [Labels][labels] Added to the Agones Allocator pods | `{}` | +| `agones.allocator.readiness.initialDelaySeconds` | Initial delay before performing the first probe (in seconds) | `3` | +| `agones.allocator.readiness.periodSeconds` | Seconds between every liveness probe (in seconds) | `3` | +| `agones.allocator.readiness.failureThreshold` | Number of times before giving up (in seconds) | `3` | +| `agones.allocator.nodeSelector` | Allocator [node labels][nodeSelector] for pod assignment | `{}` | +| `agones.allocator.serviceMetrics.name` | Second Service name for the allocator | `agones-allocator-metrics-service` | +| `agones.allocator.serviceMetrics.annotations` | [Annotations][annotations] added to the Agones allocator second Service | `{}` | +| `agones.allocator.serviceMetrics.http.port` | The port that is exposed within cluster by the [allocator service][allocator] for http requests | `8080` | +| `agones.allocator.serviceMetrics.http.portName` | The name of exposed port | `http` | +| `agones.allocator.allocationBatchWaitTime` | Wait time between each allocation batch when performing allocations in allocator mode | `500ms` | +| `agones.allocator.updateStrategy` | The [strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) to apply to the ping deployment | `{}` | +| `agones.allocator.pdb.enabled` | Set to `true` to enable the creation of a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for the allocator deployment | `false` | +| `agones.allocator.pdb.minAvailable` | Description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod. Can be either an absolute number or a percentage. Mutually Exclusive with `maxUnavailable` | `1` | +| `agones.allocator.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage. Mutually Exclusive with `minAvailable` | \`\` | +| `agones.allocator.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | + +{{% /feature %}} +{{% feature publishVersion="1.48.0" %}} + | Parameter | Description | Default | | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | | `agones.allocator.apiServerQPS` | Maximum sustained queries per second that an allocator should be making against API Server | `400` | @@ -255,6 +364,8 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.allocator.service.loadBalancerSourceRanges` | The [Load Balancer SourceRanges][loadBalancer] of the Agones allocator load balancer. Only works if the Kubernetes provider supports this option. | `[]` | | `agones.allocator.service.annotations` | [Annotations][annotations] added to the Agones allocator service | `{}` | | `agones.allocator.service.externalTrafficPolicy` | The `externalTrafficPolicy` for the Agones allocator service | `Cluster` | +| `agones.allocator.service.ipFamilyPolicy` | The `ipFamilyPolicy` setting for the Load Balancer. Kubernetes default is `SingleStack`. Set to `RequireDualStack` or `PreferDualStack` for dual-stack IPv4/IPv6 support if the Kubernetes provider supports this option. | \`\` | +| `agones.allocator.service.ipFamilies` | The `ipFamilies` setting for the Load Balancer. Set to `IPv4` (default) or `IPv6` or both in combination with dual-stack `ipFamilyPolicy` setting. | `[]` | | `agones.allocator.service.http.enabled` | If true the [allocator service][allocator] will respond to [REST requests][rest-requests] | `true` | | `agones.allocator.service.http.appProtocol` | The `appProtocol` to set on the Service for the http allocation port. If left blank, no value is set. | `` | | `agones.allocator.service.http.port` | The port that is exposed externally by the [allocator service][allocator] for [REST requests][rest-requests] | `443` | @@ -296,6 +407,8 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.allocator.pdb.maxUnavailable` | Description of the number of pods from that set that can be unavailable after the eviction. It can be either an absolute number or a percentage. Mutually Exclusive with `minAvailable` | \`\` | | `agones.allocator.topologySpreadConstraints` | Ensures better resource utilization and high availability by evenly distributing Pods in the agones-system namespace | `{}` | +{{% /feature %}} + ### Extensions | Parameter | Description | Default | diff --git a/site/content/en/docs/Reference/fleetautoscaler.md b/site/content/en/docs/Reference/fleetautoscaler.md index 8eb3f83c30..2985536f8b 100644 --- a/site/content/en/docs/Reference/fleetautoscaler.md +++ b/site/content/en/docs/Reference/fleetautoscaler.md @@ -374,6 +374,10 @@ type FleetAutoscaleRequest struct { Namespace string `json:"namespace"` // The Fleet's status values Status v1.FleetStatus `json:"status"` +{{% feature publishVersion="1.48.0" %}} + // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + MetaData *metav1.ObjectMeta `json:"metadata,omitempty"` +{{% /feature %}} } type FleetAutoscaleResponse struct {