Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
630ba9c
test(e2e): add the Kubernetes driver suite and port the runtime recon…
matthewgrossman Dec 3, 2026
4d59de5
test(e2e): drop the removed reconcile test from e2e/rust/Cargo.toml
matthewgrossman Dec 4, 2026
d1877cf
refactor(tmachine): compose k3s installers from fixtures and values
matthewgrossman Dec 4, 2026
0b32cf1
test(kubernetes): port workspace and credential driver e2e to testkit
matthewgrossman Dec 4, 2026
1cb97ba
refactor(testkit): create sandboxes in a workspace through the builder
matthewgrossman Dec 4, 2026
30b5442
ci(e2e): run conformance on the managed-workspace and credential inst…
matthewgrossman Dec 4, 2026
377396b
chore(e2e): drop the unused credential-driver fixture from the kube w…
matthewgrossman Dec 4, 2026
0a59837
refactor(tmachine): include k3s client mTLS setup as one task file
matthewgrossman Dec 4, 2026
38a5fed
refactor(kube-support): tighten the Cluster helpers
matthewgrossman Dec 4, 2026
2fc84e6
refactor(kubernetes): simplify the credential backend and reconcile t…
matthewgrossman Dec 4, 2026
2285efa
chore(tests): align test lockfiles with the root lockfile
matthewgrossman Dec 4, 2026
3f2707c
test(kubernetes): read OpenBao through the API server pod proxy
matthewgrossman Dec 4, 2026
cc36934
fix(tmachine): wait for the OpenBao pod to exist before its readiness
matthewgrossman Dec 4, 2026
a57a207
test(kubernetes): import the credential test's provider profile
matthewgrossman Dec 4, 2026
aec4362
fix(tmachine): keep the OpenBao fixture across guest boots
matthewgrossman Dec 4, 2026
1e184bd
fix(kube-support): report the pod's own status from pod_proxy_get
matthewgrossman Dec 4, 2026
4123eaf
refactor(testkit): expose Error::from_error for client errors
matthewgrossman Dec 4, 2026
f385540
test(kubernetes): find stored credentials by value
matthewgrossman Dec 4, 2026
b37dc9f
chore(tests): refresh the support lockfile after dropping kube-suppor…
matthewgrossman Dec 4, 2026
bb9af73
test(kubernetes): build OpenBao KV paths from the mount
matthewgrossman Dec 4, 2026
c4dd6fb
test(e2e): add the destructive suite family with the global settings …
matthewgrossman Dec 4, 2026
f86d2d7
test(kubernetes): add shared supervisor helpers to the kube support c…
matthewgrossman Dec 4, 2026
f0d1750
test(kubernetes): move the HA gateway rebalancing tests to the destru…
matthewgrossman Dec 4, 2026
2bb3a55
test(kubernetes): move the shared supervisor HA tests to the destruct…
matthewgrossman Dec 4, 2026
46b93a7
test(kubernetes): move the shared supervisor scaling test to the dest…
matthewgrossman Dec 4, 2026
55488cd
test(kubernetes): move the warm pool test to the destructive suite
matthewgrossman Dec 4, 2026
8d6114c
test(kubernetes): move the SPIRE broker tests to the destructive suite
matthewgrossman Dec 4, 2026
86ab381
test(e2e): remove the legacy tests the destructive suite replaces
matthewgrossman Dec 4, 2026
279c2de
docs(testing): describe when a test belongs in the destructive suite
matthewgrossman Dec 4, 2026
4737789
Merge remote-tracking branch 'origin/main' into test/5527-destructive…
matthewgrossman Dec 4, 2026
72f4799
docs(testing): drop the removed shared supervisor tasks from the task…
matthewgrossman Dec 4, 2026
cabcb75
test(kubernetes): keep destructive sandbox suffixes within the name l…
matthewgrossman Dec 5, 2026
80cb718
test(kubernetes): report step timings in the slow destructive tests
matthewgrossman Dec 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .agents/agents/gator/skills/gator-gate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1014,13 +1014,11 @@ Use `test:e2e` for changes that affect:
- Docker, Podman, VM, or Kubernetes driver behavior
- Release packaging that needs a runtime smoke test

Use `test:e2e` for Helm, Agent Sandbox CRDs, Kubernetes scheduling, namespace, workspace mode, or controller behavior; it runs the Kubernetes, managed-workspace, and operator-workspace suites.

Add `test:e2e-kubernetes` for gateway high availability or Kubernetes Secrets and Vault credential driver storage. It runs only the HA and credential-driver suites, so apply it alongside `test:e2e` when other Kubernetes coverage is also needed.
Use `test:e2e` for Helm, Agent Sandbox CRDs, Kubernetes scheduling, namespace, workspace mode, controller, gateway high availability, or credential driver behavior; it runs the Kubernetes driver and destructive suites.

Apply `test:windows` whenever a PR affects Windows support. This includes Windows or MSVC CI and `mise` tasks, Windows lock-file platform entries, the MXC driver, and `cfg(windows)` implementations or tests in otherwise cross-platform crates. Apply it alongside any applicable E2E label; it is not a substitute for runtime coverage.

Applying `test:e2e`, `test:e2e-kubernetes`, `test:e2e:continuity`, or `test:windows` starts the matching workflow. For a PR from an outside contributor, each run waits until a maintainer approves it in the Actions tab. If runs are awaiting approval and you lack maintainer authority, or the operator did not authorize approving them, move to `gator:blocked` with reason `test_dispatch_required` and state that a maintainer must approve the pending runs.
Applying `test:e2e`, `test:e2e:continuity`, or `test:windows` starts the matching workflow. For a PR from an outside contributor, each run waits until a maintainer approves it in the Actions tab. If runs are awaiting approval and you lack maintainer authority, or the operator did not authorize approving them, move to `gator:blocked` with reason `test_dispatch_required` and state that a maintainer must approve the pending runs.

`/ok to test` comments and copy-pr mirror checks are obsolete. With explicit
operator authorization, approve a pending run using:
Expand Down
51 changes: 25 additions & 26 deletions .agents/skills/helm-dev-environment/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,29 +182,31 @@ template: `supervisor.yaml` (Deployment), `supervisor-service.yaml`,
`supervisor-networkpolicy.yaml`, `supervisor-token-secret.yaml`,
`supervisor-pdb.yaml`, and `supervisor-hpa.yaml`.
`ci/values-supervisor-ha.yaml` selects two replicas and a 60-second recovery
timeout. The topology needs gateway TLS: the e2e harness keeps it on with
`ci/values-tls-port-forward.yaml` and `OPENSHELL_E2E_KUBE_TLS=1`, which reaches
the gateway over mTLS through its port-forward. `mise run
e2e:kubernetes:shared-supervisor-ha` sets both, creates a task-scoped k3d
cluster, kills the supervisor Pod that owns a sandbox, and checks that the
sandbox keeps its Pod, generation, main process, and in-memory state.
timeout. The topology needs gateway TLS. The destructive
`kubernetes-shared-supervisor` suite kills the supervisor Pod that owns a
sandbox and checks that the sandbox keeps its Pod, generation, main process,
and in-memory state:

```shell
nix run .#openshell-test-runner -- run \
--environment ubuntu-k3s --installer k3s-shared-supervisor-ha \
--family destructive --package kubernetes-shared-supervisor
```

The rendered gateway configuration and supervisor Pod template do not
depend on `supervisor.replicas`; `deploy/helm/test-supervisor-pool-scaling.sh`
(part of `mise run helm:test`) renders a pool at 1, 2, and 3 replicas and
fails if anything but the replica count differs. `mise run
e2e:kubernetes:shared-supervisor-scaling` installs a one-member pool
(`ci/values-supervisor-ha-scaling.yaml`), then the test runs `helm upgrade
fails if anything but the replica count differs. The destructive
`kubernetes-shared-supervisor-scaling` suite (installer
`k3s-shared-supervisor-scaling`) starts from a one-member pool
(`ci/values-supervisor-ha-scaling.yaml`), then runs `helm upgrade
--reuse-values --set supervisor.replicas=2` and back to 1 against the chart
the harness installed (`OPENSHELL_E2E_KUBE_CHART`), probing exec and
the installer used (`OPENSHELL_TEST_KUBE_CHART`), probing exec and
policy-mediated networking throughout. It checks that scaling up moves
nothing, that the member removed by scaling down hands its sandboxes to the
other (`cause=leaving`), that no workload, gateway Pod, or remaining member
restarts, and that a new sandbox runs after each step. It upgrades its
release, so it runs on a release of its own; the two pool tests also share a
nextest test group that never runs them at once. Against an existing cluster
whose kubeconfig the shell environment may override, set
`OPENSHELL_E2E_KUBECONFIG` (passed as `--kubeconfig` to kubectl and helm).
release, so it runs on a release of its own.

On k3d, deploy the pool with the Skaffold profile, which layers the overlay and
turns gateway TLS back on over `ci/values-skaffold.yaml`:
Expand Down Expand Up @@ -355,7 +357,7 @@ KUBECONFIG=../../../kubeconfig skaffold run -p high-availability
The `high-availability` profile expects a Secret named `openshell-ha-pg` in the `openshell`
namespace with a `uri` key. For local manual testing, either create your own
PostgreSQL Secret or use the e2e PostgreSQL fixture manifest in
`e2e/kubernetes/postgres-fixture.yaml`.
`tests/support/kube/fixtures/postgres.yaml`.

For the `high-availability` profile, return to the repository root and apply the
GatewayClass and BackendTrafficPolicy manifest after Skaffold has installed
Expand Down Expand Up @@ -540,15 +542,11 @@ The kube e2e wrapper creates only one port-forward, to `svc/openshell`; it no
longer forwards the unauthenticated health listener or runs a `/readyz` e2e
target. `/readyz` remains covered by server unit/integration tests.

Use `mise run e2e:kubernetes:ha-rebalancing` for full-suite HA coverage. The
task creates an external PostgreSQL fixture, installs Envoy Gateway, applies
`deploy/kube/manifests/envoy-gateway-openshell.yaml`, enables the chart
`GRPCRoute`, and runs the full Kubernetes e2e suite, including
`kubernetes_ha_rebalancing`. That coverage validates sandbox create/watch and
exec through the Envoy proxy while gateway replicas scale up, scale down, and
rotate. It also keeps a long-running sandbox alive and runs upload/download
operations while gateway pods roll, so file sync exercises the same relay retry
path as interactive sessions.
The destructive `kubernetes-ha` suite (installer `k3s-ha`) covers gateway
high availability. It validates sandbox create/watch and exec while gateway
replicas scale up, scale down, and rotate. It also keeps a long-running sandbox
alive and runs upload/download operations while gateway pods roll, so file sync
exercises the same relay retry path as interactive sessions.

If you reuse an existing Skaffold cluster for the full kube suite, make sure the
chart has `server.hostGatewayIP` set so sandbox pods can resolve
Expand Down Expand Up @@ -651,8 +649,9 @@ durable sandbox record.
The `credential-driver-vault` Skaffold profile applies
`ci/values-credential-driver-vault.yaml`. Its external OpenBao/Vault backend
must expose HTTPS at the configured service DNS name and publish the issuing CA
certificate as the `ca.crt` key in the `openbao-ca` ConfigMap. Local e2e uses
OpenBao dev TLS and an `openbao-0` DNS alias matching its generated certificate.
certificate as the `ca.crt` key in the `openbao-ca` ConfigMap. The e2e fixture
(`tests/tmachine/ansible/playbooks/k3s-openbao.yaml`) generates that CA and an
`openbao-0` DNS alias its certificate covers.
The Helm value
`server.credentialDrivers.vault.caConfigMapName` mounts that key into the
gateway and renders the driver's `ca_bundle` setting. Non-loopback HTTP
Expand Down
37 changes: 4 additions & 33 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,19 @@ failure-output = "immediate-final"
# Flag slow tests after 60s and terminate them after five minutes.
slow-timeout = { period = "60s", terminate-after = 5 }

# The HA tests scale and roll the shared gateway Deployment, so they cannot
# overlap. Nextest runs each test in its own process. The filter matches test
# names because binary() fails in workspaces without the HA test binary.
# The SPIFFE test kills supervisor members and replaces SPIRE agents of the
# release it runs against. Test names, not binary(), because binary() fails in
# workspaces without the test binary.
[test-groups]
kubernetes-ha = { max-threads = 1 }
kubernetes-shared-supervisor-pool = { max-threads = 1 }

[[profile.e2e-kubernetes.overrides]]
filter = "test(/gateway_(scale_and_rollout|pod_rolls)$/)"
test-group = "kubernetes-ha"

# These change the shared supervisor pool of the release they run against:
# they kill members or gateways, or scale the pool. Never run them at once.
# Test names, not binary(), for the reason above.
[[profile.e2e-kubernetes.overrides]]
filter = "test(/^(losing_a_supervisor_pod_moves_its_sandboxes_without_restarting_them|scaling_a_supervisor_pool_up_and_down_keeps_its_sandboxes_running|pool_sessions_follow_their_supervisors_gateway|shared_supervisor_acts_as_each_sandboxs_stable_spiffe_identity|supervisors_spread_evenly_across_gateways)$/)"
test-group = "kubernetes-shared-supervisor-pool"

# Scaling the pool runs two bounded Helm upgrades (up to 6 minutes each), waits
# for each member to join or leave, and creates sandboxes until one lands on
# the new member, so it gets 20 minutes instead of five.
[[profile.e2e-kubernetes.overrides]]
filter = "test(/^scaling_a_supervisor_pool_up_and_down_keeps_its_sandboxes_running$/)"
slow-timeout = { period = "60s", terminate-after = 20 }

# Three bounded rollouts (up to 5 minutes each) and four settle and exec rounds.
[[profile.e2e-kubernetes.overrides]]
filter = "test(/^pool_sessions_follow_their_supervisors_gateway$/)"
slow-timeout = { period = "60s", terminate-after = 20 }

[[profile.e2e-kubernetes.overrides]]
filter = "test(/^shared_supervisor_acts_as_each_sandboxs_stable_spiffe_identity$/)"
test-group = "kubernetes-shared-supervisor-pool"
# Fresh acquisitions through every node and a replacement agent precede
# supervisor failover and credential rotation.
slow-timeout = { period = "60s", terminate-after = 15 }

# One bounded rollout per supervisor and one for the gateway, each followed by
# a settle round.
[[profile.e2e-kubernetes.overrides]]
filter = "test(/^supervisors_spread_evenly_across_gateways$/)"
slow-timeout = { period = "60s", terminate-after = 20 }

# Relative to the profile store dir (`e2e/rust/target/nextest/e2e-kubernetes/`).
[profile.e2e-kubernetes.junit]
path = "../../../../../results/e2e-kubernetes.xml"
4 changes: 4 additions & 0 deletions .github/workflows/branch-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ jobs:
cargo fmt --manifest-path tests/runner/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/conformance/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/continuity/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/destructive/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/drivers/docker/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/drivers/kubernetes/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/drivers/podman/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/suites/features/Cargo.toml --all -- --check
cargo fmt --manifest-path tests/support/Cargo.toml --all -- --check
Expand Down Expand Up @@ -342,7 +344,9 @@ jobs:
cargo clippy --locked --manifest-path tests/runner/Cargo.toml --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/continuity/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/destructive/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/drivers/docker/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/drivers/kubernetes/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/drivers/podman/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/suites/features/Cargo.toml --workspace --all-targets -- -D warnings
cargo clippy --locked --manifest-path tests/support/Cargo.toml --all-targets -- -D warnings
Expand Down
Loading
Loading