Skip to content

feat(operator): stage immutable template revisions per server - #769

Open
Baylem wants to merge 37 commits into
GameplanePanel:masterfrom
Baylem:fix/audit-staged-rollouts
Open

Baylem wants to merge 37 commits into
GameplanePanel:masterfrom
Baylem:fix/audit-staged-rollouts

Conversation

@Baylem

@Baylem Baylem commented Oct 21, 2026

Copy link
Copy Markdown
Member

Shared GameTemplate updates currently change every referencing server immediately. This adds per-server adoption of immutable template snapshots: Automatic remains the default, while OnRequest retains the admitted content until an administrator requests the exact installed revision digest.

The operator reports desired, effective and observed running revisions. Rendering, backup metadata, restore planning and capture filters use the effective snapshot. Adoption shares the existing lifecycle owner with backup/restore/wipe, gracefully stops using the old template, waits for the owned workload to drain, and then changes the pin. A later catalog update cannot replace an already admitted target. Existing PVC identities remain intact.

Existing servers initialize revision tracking without a provenance-only restart, preserving their Pod templates and leaving running revision unknown. Real configuration edits and security upgrades still apply. Restricted-incompatible targets are rejected before admission or drain. New servers pin before first rendering. Documentation covers Module version pinning, mutable image references, missing snapshots and the distinction between data backups and runtime rollback bundles.

Includes #760, #766, #767, #764, #762 and the #759 build prerequisite. These integrations preserve pod-bound backup preparation, effective-template volume classifications, Restricted validation and configurable resource changes.

Validation: Linux operator/API/agent builds, controller/unit/envtest and E2E source compilation, canonical CRD generation/synchronization, actionlint and offline zizmor passed. Runtime tests run in CI under repository policy. Added regressions for exact admission, owner/drain races, baseline initialization, concurrent spec edits, effective-template consumption and incompatible security profiles, plus a real-cluster data-retention rollout scenario. CI runtime results are pending.

Closes #731

Baylem added 20 commits October 21, 2026 10:59
Signed-off-by: Baylem <zelathis@gmail.com>
…cement

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

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

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 140 files, which is 40 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

Check out review usage here.

⚙️ Run configuration
  • Configuration used: Repository: GameplanePanel/Gameplane/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fdf2a116-c935-4817-804e-772a6410d0b4
📥 Commits

Reviewing files that changed from the base of the PR and between df1e371 and 4d2bfc6.

📒 Files selected for processing: 140
  • .github/workflows/ci.yaml
  • agent/cmd/main.go
  • agent/internal/quiesce/quiesce_test.go
  • agent/internal/target/target.go
  • agent/specs.md
  • api/internal/gateway/capture.go
  • api/internal/handlers/capture.go
  • api/internal/handlers/capture_node.go
  • api/internal/handlers/capture_node_test.go
  • api/internal/handlers/lifecycle.go
  • api/internal/handlers/resources.go
  • api/internal/handlers/resources_annotations_test.go
  • api/internal/kube/capture.go
  • api/internal/kube/capture_node.go
  • api/internal/kube/capture_node_test.go
  • api/internal/rbac/rbac.go
  • api/specs.md
  • capture-sidecar/Dockerfile
  • capture-sidecar/cmd/main.go
  • capture-sidecar/go.mod
  • capture-sidecar/internal/httpserver/artifacts.go
  • capture-sidecar/internal/httpserver/artifacts_test.go
  • capture-sidecar/internal/nodecapture/worker.go
  • capture-sidecar/internal/nodecapture/worker_test.go
  • capture-sidecar/specs.md
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_backups.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_backupschedules.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_clusters.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_gameservers.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_gametemplates.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_modules.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_modulesources.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_networkcaptures.yaml
  • charts/gameplane/charts/gameplane-crds/crds/gameplane.local_restores.yaml
  • charts/gameplane/crd-manifests/gameplane.local_backups.yaml
  • charts/gameplane/crd-manifests/gameplane.local_backupschedules.yaml
  • charts/gameplane/crd-manifests/gameplane.local_clusters.yaml
  • charts/gameplane/crd-manifests/gameplane.local_gameservers.yaml
  • charts/gameplane/crd-manifests/gameplane.local_gametemplates.yaml
  • charts/gameplane/crd-manifests/gameplane.local_modules.yaml
  • charts/gameplane/crd-manifests/gameplane.local_modulesources.yaml
  • charts/gameplane/crd-manifests/gameplane.local_networkcaptures.yaml
  • charts/gameplane/crd-manifests/gameplane.local_restores.yaml
  • charts/gameplane/templates/_helpers.tpl
  • charts/gameplane/templates/api.yaml
  • charts/gameplane/templates/audit-syslog-bridge.yaml
  • charts/gameplane/templates/crd-apply-hook.yaml
  • charts/gameplane/templates/diagnostics.yaml
  • charts/gameplane/templates/gateway.yaml
  • charts/gameplane/templates/mcp-server.yaml
  • charts/gameplane/templates/namespaces.yaml
  • charts/gameplane/templates/operator-strategy-migrate.yaml
  • charts/gameplane/templates/operator.yaml
  • charts/gameplane/templates/poddisruptionbudgets.yaml
  • charts/gameplane/templates/telemetry-receiver.yaml
  • charts/gameplane/templates/validate.yaml
  • charts/gameplane/templates/web.yaml
  • charts/gameplane/values-production.example.yaml
  • charts/gameplane/values.yaml
  • charts/tests/check_workload_security.py
  • charts/tests/check_workloads.py
  • deploy/kind/e2e.sh
  • docs/install.md
  • docs/module-authoring.md
  • docs/operator-operations.md
  • docs/production-placement.md
  • docs/release-notes.md
  • docs/security.md
  • docs/template-rollouts.md
  • i18n/locales/en/app.json
  • operator/api/v1alpha1/backup_types.go
  • operator/api/v1alpha1/gameserver_types.go
  • operator/api/v1alpha1/gametemplate_types.go
  • operator/api/v1alpha1/zz_generated.deepcopy.go
  • operator/cmd/main.go
  • operator/config/crd/gameplane.local_backups.yaml
  • operator/config/crd/gameplane.local_gameservers.yaml
  • operator/config/crd/gameplane.local_gametemplates.yaml
  • operator/config/rbac/role_namespace.yaml
  • operator/hack/condition-ids/main.go
  • operator/internal/agent/client.go
  • operator/internal/agent/client_test.go
  • operator/internal/controller/auxiliary_resources.go
  • operator/internal/controller/auxiliary_resources_test.go
  • operator/internal/controller/backup_controller.go
  • operator/internal/controller/backup_envtest_test.go
  • operator/internal/controller/backup_forget.go
  • operator/internal/controller/backup_forget_envtest_test.go
  • operator/internal/controller/backup_forget_test.go
  • operator/internal/controller/backup_guard.go
  • operator/internal/controller/backup_guard_test.go
  • operator/internal/controller/backup_manifest.go
  • operator/internal/controller/backup_manifest_test.go
  • operator/internal/controller/backup_preparation.go
  • operator/internal/controller/backup_stopped_test.go
  • operator/internal/controller/backup_volumesnapshot.go
  • operator/internal/controller/gameserver_controller.go
  • operator/internal/controller/gameserver_envtest_test.go
  • operator/internal/controller/gameserver_files_test.go
  • operator/internal/controller/gameserver_idle.go
  • operator/internal/controller/gameserver_restart.go
  • operator/internal/controller/gameserver_sentinel.go
  • operator/internal/controller/gameserver_template_revision.go
  • operator/internal/controller/gameserver_template_revision_test.go
  • operator/internal/controller/gameserver_tunnel.go
  • operator/internal/controller/gameserver_wipe.go
  • operator/internal/controller/gameserver_wipe_guard.go
  • operator/internal/controller/gameserver_wipe_inventory_test.go
  • operator/internal/controller/helpers.go
  • operator/internal/controller/helpers_envtest_test.go
  • operator/internal/controller/helpers_extra_test.go
  • operator/internal/controller/lifecycle_operation.go
  • operator/internal/controller/lifecycle_operation_envtest_test.go
  • operator/internal/controller/lifecycle_operation_test.go
  • operator/internal/controller/manager_scope_envtest_test.go
  • operator/internal/controller/networkcapture_controller.go
  • operator/internal/controller/networkcapture_filter.go
  • operator/internal/controller/networkcapture_node.go
  • operator/internal/controller/networkcapture_node_test.go
  • operator/internal/controller/restore_controller.go
  • operator/internal/controller/restore_lifecycle.go
  • operator/internal/controller/restore_template.go
  • operator/internal/controller/restore_volumesnapshot.go
  • operator/internal/controller/restore_volumesnapshot_dispatch_test.go
  • operator/internal/controller/restore_volumesnapshot_requeue_test.go
  • operator/internal/controller/workload_security.go
  • operator/internal/controller/workload_security_test.go
  • operator/specs.md
  • test/e2e/backup_stopped_e2e_test.go
  • test/e2e/buckets.sh
  • test/e2e/management_placement_e2e_test.go
  • test/e2e/restricted_workloads_e2e_test.go
  • test/e2e/specs.md
  • test/e2e/template_rollout_e2e_test.go
  • test/e2e/upgrade_e2e_test.go
  • web/specs.md
  • web/src/components/backups/BackupDetailDrawer.test.tsx
  • web/src/components/backups/BackupDetailDrawer.tsx
  • web/src/routes/CreateServer.tsx
  • web/src/types.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 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

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
@github-actions github-actions Bot added area: api REST/WebSocket gateway area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: modules game template OCI bundles area: operator controller-runtime operator and CRDs area: optional-components sentinel, capture-sidecar, mcp-server, tunnel, audit-syslog-bridge, telemetry-receiver area: shared netguard, gameaction, gameproto, svcutil and other shared packages area: web React dashboard type: feature New capability or user-facing addition labels Oct 21, 2026
Baylem added 10 commits October 21, 2026 17:10
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>
Signed-off-by: Baylem <zelathis@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: agent in-pod sidecar area: api REST/WebSocket gateway area: chart Helm chart and deployment area: e2e kind-based end-to-end suite area: modules game template OCI bundles area: operator controller-runtime operator and CRDs area: optional-components sentinel, capture-sidecar, mcp-server, tunnel, audit-syslog-bridge, telemetry-receiver area: shared netguard, gameaction, gameproto, svcutil and other shared packages area: web React dashboard type: feature New capability or user-facing addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

operator: stage OCI template upgrades before rolling all referencing game servers

1 participant