Skip to content

fix(networking): isolate tenant workloads across managed game namespaces - #894

Merged
ValgulNecron merged 15 commits into
masterfrom
fix/tenant-network-profile
Nov 12, 2026
Merged

ValgulNecron merged 15 commits into
masterfrom
fix/tenant-network-profile

Conversation

@Baylem

@Baylem Baylem commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Closes #869. Closes #885. Part of #867.

Merge order. The namespace admission and credential boundary from #886 and the pod-local probes from #889 are on master. Commit e086e430 includes master at 0988999b. This PR targets master directly and changes 25 files. #908 builds on it. CI on the current networking revision

Policy changes. The opt-in networkPolicies.tenantIsolation profile installs network policies in every managed game namespace. It requires explicit API and kubelet host CIDRs and repository ports, scopes DNS and backup egress, and confines a tunnel to its own game or wake listener. Provider-specific egress remains a separate administrator grant. The security and monitoring guides show the per-game and legacy kubelet rules and the separate Prometheus scrape policy.

Acceptance tests. The Cilium CI bucket runs two games in one namespace and uses a second tenant with a matching game name. It exercises Pod IP and Service paths, direct external NodePort player traffic, an authenticated frp route, a Restic backup to an external test repository, fresh agent heartbeats and live metrics. Reachable controls verify that denials of private HTTPS, a simulated link-local metadata endpoint and peer administration ports have meaning. The same fixture checks Restricted Pod Security Admission and per-server and fallback probe behavior.

The stacked Linux operator and E2E sources compiled locally. Helm rendered the two-tenant profile, and the fixture scripts passed syntax checks. The Cilium job supplies the live acceptance result.

Enforcing-CNI qualification on e40591583a57f2ea945161fed134557e28c7ff73

The AMD64 Kind/Cilium test passed in 283.91 seconds. Two games in one namespace and a same-name game in another exercised Pod IP and Service NAT paths under Restricted Pod Security Admission. Authorized external NodePort players, an authenticated FRP tunnel, game-local sentinel traffic, agent heartbeats, monitoring and a Restic repository write succeeded. The tenant probes denied cross-game administration, cross-tenant relay access, private HTTPS and the simulated link-local metadata endpoint after their positive controls succeeded. The live profile admitted kubelet TCP 25566 for one game and TCP 25575 for the other. Named startup and numeric readiness references resolved to the same allowed socket for each game. The separate monitoring rule admitted the scrape. Switching to the documented fallback removed the per-game policies and produced the explicit shared two-port grant. Cilium on the network PR · Independent Cilium run on the dependent observability PR

…namespaces

Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem
Baylem requested a review from ValgulNecron as a code owner November 11, 2026 02:01
@Baylem Baylem added area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: operator controller-runtime operator and CRDs type: security Security hardening or vulnerability fix labels Nov 11, 2026 — with ChatGPT Codex Connector
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0988999 and e086e43.

Files selected for processing: 25

  • .github/workflows/ci.yaml
  • changelog/unreleased/894-tenant-network-policies.md
  • charts/gameplane/templates/networkpolicies.yaml
  • charts/gameplane/templates/operator.yaml
  • charts/gameplane/templates/validate.yaml
  • charts/gameplane/values.yaml
  • charts/tests/check_network_isolation.py
  • deploy/kind/with-network-peers.sh
  • docs/install.md
  • docs/monitoring.md
  • docs/security.md
  • operator/cmd/main.go
  • operator/internal/controller/gameserver_controller.go
  • operator/internal/controller/gameserver_tunnel.go
  • operator/internal/controller/gameserver_tunnel_test.go
  • operator/internal/controller/owned_delete.go
  • operator/internal/controller/owned_delete_test.go
  • operator/internal/controller/sentinel_isolation.go
  • operator/internal/controller/sentinel_isolation_review_test.go
  • operator/specs.md
  • test/e2e/network_isolation_e2e_test.go
  • test/e2e/network_peers_e2e_test.go
  • test/e2e/specs.md
  • test/e2e/suite-components.json
  • test/e2e/telemetry_e2e_helpers_test.go
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem Baylem closed this Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

CI Report - e086e43

run 43208169279 - attempt 1

0 failed - 32 passed - 1 skipped - 137m24s elapsed

Test selection: full (selection-rule change) - per-suite table

Coverage

Module Measured Gate Margin
web L94.03 S92.14 B86.51 F90.19 L92 S92 B82 F76 +0.14

Changed

Area Files +/-
test/ 5 +426/-33
operator/ 9 +240/-134
charts/ 5 +104/-20
docs/ 3 +67/-10
deploy/ 1 +48/-0
.github/ 1 +9/-4
changelog/ 1 +5/-0

Slowest jobs

Job Duration
e2e telemetry / arm64 (kind) 24m13s
e2e telemetry / amd64 (kind) 22m44s
build e2e images 15m30s
e2e web live / amd64 (kind) 14m51s
e2e restricted-workloads / amd64 (kind) 14m33s

e2e buckets run

api-agent, api-auth, api-mods, api-rbac, api-roles, backup-preparation, bot-fast, management-placement, monitoring, multicluster, network-isolation, operator, optional-components, postgres-availability, ratelimit, recovery, restricted-workloads, telemetry, upgrade, wake-hostport

…rking

Signed-off-by: Baylem <zelathis@gmail.com>
…t isolation

Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem Baylem reopened this Nov 11, 2026
@Baylem
Baylem changed the base branch from master to stack/869-security-and-probes November 11, 2026 04:27
Signed-off-by: Baylem <zelathis@gmail.com>
…ion upgrade

Signed-off-by: Baylem <zelathis@gmail.com>
@ValgulNecron

Copy link
Copy Markdown
Collaborator

Hey, could you please add changelog entry?

Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem

Baylem commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

Added the requested unreleased changelog entry.

CI passed on e4059158. The diff through 2560c240 changes only the changelog entry and its index link. I canceled the repeat CI run because this update changes only Markdown.

@Baylem Baylem self-assigned this Nov 12, 2026
…n baseline

Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem
Baylem changed the base branch from stack/869-security-and-probes to master November 12, 2026 11:16
Signed-off-by: Baylem <zelathis@gmail.com>
@Baylem
Baylem added this pull request to stack #949 November 12, 2026 15:55
@ValgulNecron
ValgulNecron merged commit 15e65f4 into master Nov 12, 2026
68 checks passed
@ValgulNecron
ValgulNecron deleted the fix/tenant-network-profile branch November 22, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: operator controller-runtime operator and CRDs type: security Security hardening or vulnerability fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(monitoring): clarify per-server and legacy probe ingress rules fix(networking): isolate tenant traffic across games, sentinels and tunnels

2 participants