Skip to content

Promote PortPolicyNone Feature Gate from Beta to Stable #4587

@markmandel

Description

@markmandel

What does this feature do?

PortPolicyNone enables a portPolicy: None option on GameServer port definitions. When set:

  • Agones performs no dynamic host port allocation
  • The hostPort field is ignored
  • status.ports[].port returns the containerPort value rather than a dynamically assigned host port
  • Useful for workloads that rely on container networking directly (e.g., service mesh, CNI plugins)

Current state: Beta (enabled by default since 1.49.0)

Acceptance Criteria / Tasks

  • Manual audit: Before starting, grep the repo for FeaturePortPolicyNone and PortPolicyNone to confirm all usage sites — the list below may not be exhaustive
  • Remove the FeaturePortPolicyNone feature gate check from pkg/apis/agones/v1/gameserver.go — fold the gated logic to always-true (unconditionally allow portPolicy: None and return containerPort in status)
  • Remove the GKE Autopilot feature gate check for PortPolicyNone in pkg/cloudproduct/gke/gke.go
  • Move FeaturePortPolicyNone from // Beta features to // Stable features in pkg/util/runtime/features.go (keep it in featureDefaults as true so old feature-gate strings don't fail to parse)
  • Move PortPolicyNone from Beta to Stable section in install/helm/agones/defaultfeaturegates.yaml
  • Remove PortPolicyNone from BETA_FEATURE_GATES in build/Makefile
  • Remove PortPolicyNone=false from the inverted e2e-runner config in cloudbuild.yaml
  • Update site/content/en/docs/Guides/feature-stages.md — move row from Beta table to Stable table
  • Update test/upgrade/versionMap.yaml — add entry showing PortPolicyNone moves to stable gates in this release
  • Clean up any unit/e2e tests that conditionally skip or toggle FeaturePortPolicyNone (e.g., TestGameServerPortPolicyNone in test/e2e/gameserver_test.go, tests in pkg/apis/agones/v1/gameserver_test.go)

Files to change

File Change
pkg/util/runtime/features.go Move FeaturePortPolicyNone const + default to Stable section
pkg/apis/agones/v1/gameserver.go Remove FeatureEnabled(FeaturePortPolicyNone) guards; fold logic unconditionally
pkg/cloudproduct/gke/gke.go Remove FeaturePortPolicyNone check
pkg/apis/agones/v1/gameserver_test.go Remove feature-gate-disabled test cases
pkg/cloudproduct/gke/gke_test.go Remove feature-gate-disabled test cases
test/e2e/gameserver_test.go Remove t.Skip guard on TestGameServerPortPolicyNone
install/helm/agones/defaultfeaturegates.yaml Move to Stable section
build/Makefile Remove from BETA_FEATURE_GATES
cloudbuild.yaml Remove PortPolicyNone=false from inverted e2e config
site/content/en/docs/Guides/feature-stages.md Move row to Stable table
test/upgrade/versionMap.yaml Add stable entry for this release

Verification

  • make lint test-go passes with no skipped PortPolicyNone-gated test cases
  • E2E test TestGameServerPortPolicyNone runs without any feature-gate skip
  • A GameServer with portPolicy: None can be created without needing to set the feature gate
  • Setting PortPolicyNone=true or PortPolicyNone=false in the feature gate string must not cause a parse error (covered by keeping the const in featureDefaults)

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueThese are great first issues. If you are looking for a place to start, start here!help wantedWe would love help on these issues. Please come help us!kind/cleanupRefactoring code, fixing up documentation, etc

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions