Skip to content

test: Add transparent inbound interception E2E suite - #2393

Merged
cwiklik merged 5 commits into
rossoctl:mainfrom
huang195:feat/transparent-inbound-e2e
Aug 19, 2026
Merged

cwiklik merged 5 commits into
rossoctl:mainfrom
huang195:feat/transparent-inbound-e2e

Conversation

@huang195

@huang195 huang195 commented Aug 18, 2026 •

Copy link
Copy Markdown
Member

Summary

E2E suite gating transparent inbound interception (rossoctl/cortex#330). Companions: rossoctl/cortex#776 (listener + iptables, merged), rossoctl/operator#511 (the switch).

The load-bearing test is test_direct_pod_dial_is_validated. The reason the feature exists is that inbound JWT validation must not be sidestepped by another pod dialing the agent's real port, and nothing in the existing suite covers that.

Design notes

Two agents, two namespaces. One transparent, one default reverse-proxy. A single-shape run cannot distinguish "validation works" from "nothing reached the agent at all". The reverse-proxy namespace is a control that deliberately documents the bypass as it exists today — if it starts failing because the bypass is gone, the default changed and the test should be retired with it.

The probe always runs from a separate pod. Dialing from inside the agent pod would traverse loopback, which shares the network namespace, is inside the trust boundary by construction, and is deliberately not intercepted — so it would prove nothing.

The stand-in agent honors PORT. Without that the reverse-proxy control could not be exercised at all: an agent that ignores PORT collides with AuthBridge on the stolen port and never starts, which is itself one of the failure modes transparent interception removes.

Coverage beyond the boundary property

  • Shape — agent keeps its own port and gets no PORT env var; sidecar declares transparent-in and does not claim the agent's port; proxy-init has both INBOUND_TRANSPARENT_PORT and POD_IP (from the downward API, without which the ambient inbound path is uncaptured); AB_INBOUND is live in the pod's nat table, not merely configured.
  • Don't break the neighbours — :9091 is not JWT-gated (it would fail kubelet probes and crash-loop the pod), :9094 stays reachable for abctl, and AB_REDIRECT is still present so inbound capture did not disturb the egress guard.

Three platform constraints the fixtures satisfy

Each of these otherwise produces a silently meaningless run rather than a failure — found by running against a live cluster:

  1. The namespace needs rossoctl-enabled=true, or the injection webhook's namespaceSelector skips it and the pod comes up with no sidecar at all.
  2. rossoctl.io/type cannot be applied by hand — the agent-label-protection ValidatingAdmissionPolicy rejects it. Injection is driven through an AgentRuntime CR, which is how agents are deployed for real.
  3. Readiness alone is not a usable gate: the AgentRuntime controller labels the pod template after the Deployment exists, so the first ready pod predates injection. The fixtures wait for the authbridge-proxy container.

Images are ones already cached on Kind nodes (nginx-unprivileged:alpine, whose busybox wget doubles as the probe), so the suite needs no registry pull.

Result: 10 passed, 0 skipped on Kind

The A/B that matters, verified live and attributed to the sidecar rather than to a waypoint (Transparent inbound server listening addr=[::]:8083, then jwt-validation … status=401 … reason="missing Authorization header"):

Mechanism Port dialed pod-to-pod Result
reverse-proxy (default) 8000 (sidecar) 401
reverse-proxy (default) 8001 (relocated agent) 200 — the bypass
transparent 8000 (agent's real port) 401

Also confirmed: an undeclared port :80 returns 401 (multi-port coverage is real), and health/stats/session return 200/200/404 — not gated.

Three things the first live run changed

Running this for real surfaced two bugs in the suite and one in the platform:

  • test_agent_keeps_its_own_port could not pass even on correct behavior. It asserted PORT was absent, but the stand-in agent declares PORT itself — it must, or the reverse-proxy control cannot be exercised at all. Now asserts the operator did not rewrite it, which is the real discriminator.
  • Two tests could only ever skip. The chain and egress-guard tests exec'd iptables-save in the sidecar, whose image has no iptables — quietly dropping both assertions from a green run. They now assert on proxy-init's own report, which is meaningful because that container runs require_jump guards that abort on a rule that did not land.
  • Retargeted at pre-onboarded namespaces (team1/team2, overridable). A fresh namespace lacks the per-namespace plumbing — authbridge-config, plus the Keycloak client registration that produces each agent's credentials Secret — so an injected pod there never starts, including default reverse-proxy ones. Fixtures flip inboundInterception in place and restore the original body on teardown, since these namespaces are shared.

TI_STUB_CREDENTIALS

On clusters where Keycloak client registration is broken (no k8s.keycloak.org CRD, as on community-provider installs), every injected pod stays Pending on FailedMount. Without the flag the suite skips with that cause named, rather than failing and pointing suspicion at the interception rules.

TI_STUB_CREDENTIALS=1 creates a placeholder so the boundary can still be tested. Opt-in on purpose: stubbing by default would let this suite go green on a broken cluster. Sound for these assertions — the Secret is for outbound token-exchange, and inbound rejects a request with no Authorization header before any IdP contact — but explicitly not sound for any test needing a valid token.

Not covered here

The ambient (HBONE) path. The cluster used runs only istiod — no ztunnel — so there is no ambient data plane to exercise; counters confirm all traffic took plain PREROUTING. Adding an ambient case needs a cluster with ztunnel deployed.

E2E HyperShift is pending awaiting a maintainer /run-e2e.

@huang195

Copy link
Copy Markdown
Member Author

Green on a real cluster: 10 passed, 0 skipped

First live run surfaced three problems — two in this suite, one in the platform.

Retargeted at pre-onboarded namespaces (team1/team2, overridable). A fresh namespace lacks the per-namespace plumbing (authbridge-config, plus the Keycloak client registration that produces each agent's credentials Secret), so an injected pod there never starts — including default reverse-proxy ones. Fixtures now flip inboundInterception in place and restore the original body on teardown, since these namespaces are shared.

Fixed an assertion that could not pass even on correct behavior. test_agent_keeps_its_own_port asserted PORT was absent, but the stand-in agent declares PORT itself — it must, or the reverse-proxy control can't be exercised at all. Now asserts the operator didn't rewrite it, which is the real discriminator.

Removed two silent skips. The chain and egress-guard tests exec'd iptables-save in the sidecar, whose image has no iptables — so they could only ever skip, quietly dropping two assertions from a green run. They now assert on proxy-init's own report, which is meaningful because that container runs require_jump guards that abort on a rule that didn't land. The egress test also checks egress setup completed before inbound setup, since the ambient DNAT is installed at the head of the egress chain.

TI_STUB_CREDENTIALS=1 for clusters where Keycloak registration is broken (this one: no k8s.keycloak.org CRD). Opt-in on purpose — stubbing by default would let the suite go green on a broken cluster. Sound for these assertions (the Secret is for outbound token-exchange; inbound rejects a header-less request before any IdP contact), explicitly not sound for a test needing a valid token. Without the flag the suite skips with that cause named.

The A/B that matters

Mechanism Port Result
reverse-proxy (default) 8000 (sidecar) 401
reverse-proxy (default) 8001 (relocated agent) 200 — the bypass
transparent 8000 (agent's real port) 401

Attributed to the sidecar, not a waypoint: Transparent inbound server listening addr=[::]:8083 followed by jwt-validation … status=401 … reason="missing Authorization header".

Also verified an undeclared port :80 returns 401, so multi-port coverage is real, and health/stats/session (9091/9093/9094) return 200/200/404 — not gated.

Assisted-By: Claude Code

@huang195

Copy link
Copy Markdown
Member Author

All seven addressed (3a828db6) — every one was valid.

#1 The suite gated nothing — the important one

Confirmed exactly. openshell/ and token_exchange/ each have a runner; transparent_inbound/ was referenced by no workflow or script, so it ran only when a human typed the command. Not what a regression gate is for.

Added to the shared target list in 90-run-e2e-tests.sh, so it runs wherever that runner does (Kind and HyperShift e2e, release validation).

That is only safe because the suite now self-gates. It runs against whatever images a cluster happens to have, and an operator predating transparent inbound silently ignores the namespace flip and port-steals instead — which would fail the transparent assertions for a reason unrelated to the code under test. Detected from the injected pod (the sidecar declares transparent-in only when the feature is present) and skipped with the cause named. It becomes a real gate as soon as a cluster carries the feature, which matters here since cortex#776 is merged but the operator switch (rossoctl/operator#511) is not.

#2 Stub Secret — two bugs, both real

It leaked. Teardown restored the namespace config and deleted the workload but never the placeholder Secret, so a fake credential outlived the run in a shared namespace. Now recorded on creation and removed on teardown — verified: today's run cleaned its own, and the three left in team1/team2 turned out to be debris from my earlier manual debugging, which I've also removed.

And the stdout/stderr point is exactly right. "already exists" goes to stderr, which kubectl() drops, so from the second poll onward it always read as failure and re-attempted the create every 3s. Keyed on the exit code now, via a kubectl_rc helper.

#3 _set_mechanism not idempotent

Correct. Prepending blind meant TI_KEEP=1 or a killed run left keys behind, and the next run emitted duplicate top-level YAML keys. Strips any it finds first.

#4 _namespace_config dead — and worse than dead

Right on both counts: dead after the retarget to pre-onboarded namespaces, and it built exactly the synthetic config that _set_mechanism's own docstring argues against. Leaving it there invited someone to use it. Deleted.

#5–#7 Three assertions that could pass while broken

These are the ones I'm most glad you caught — all three were false confidence rather than cosmetic:

  • "9091" in logs matched the whole log, where that number appears in plenty of other contexts, so it never actually checked the exempt list. Now parses the exempt sidecar ports= field.
  • logs.index() raises ValueError when a marker is missing, so that assertion's message could never print — the failure would have surfaced as an unrelated traceback. find() plus an explicit presence check.
  • The control asserting status != 401 would stay green if the bypass closed with a 403, or if the port stopped answering at all. The control would silently stop being a control while still reporting success. Now asserts 200, with the message explaining that a failure here may mean the default changed and the test should be retired.

Verification

10 passed on Kind after the changes; ruff check and ruff format --check clean; stub Secret confirmed removed on teardown.

Assisted-By: Claude Code

Gates the inbound half of rossoctl/cortex#330. The load-bearing test is
test_direct_pod_dial_is_validated: the reason the feature exists is that JWT
validation must not be sidestepped by another pod dialing the agent's real port,
and nothing in the existing suite covers that.

Deploys two agents in separate namespaces — transparent and the default
reverse-proxy — because a single-shape run cannot distinguish "validation
works" from "nothing reached the agent at all". The reverse-proxy namespace is a
control that deliberately documents the bypass as it exists today; if it starts
failing because the bypass is gone, the default changed and the test should be
retired with it.

The probe always runs from a separate pod. Dialing from inside the agent pod
would traverse loopback, which shares the network namespace and is inside the
trust boundary by construction — deliberately not intercepted, so it would prove
nothing.

Beyond the boundary property the suite covers:

- Shape: the agent keeps its own port and gets no PORT env var; the sidecar
  declares transparent-in and does not claim the agent's port; proxy-init has
  both INBOUND_TRANSPARENT_PORT and POD_IP (the latter from the downward API,
  without which the Istio ambient inbound path is uncaptured); AB_INBOUND is
  live in the pod's nat table, not merely configured.
- Neighbours: :9091 is not JWT-gated (it would fail kubelet probes and
  crash-loop the pod), :9094 stays reachable for abctl, and AB_REDIRECT is
  still present so inbound capture did not disturb the egress guard.

Namespace-scoped because inboundInterception is resolved from the namespace
authbridge-runtime-config ConfigMap — the pod mutator has no access to the
AgentRuntime CR — so each mechanism needs its own namespace.

Requires the operator and authbridge images built from the corresponding
rossoctl/cortex branch; skipped on non-Linux nodes.

Refs: rossoctl/cortex#330

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Running the suite on Kind surfaced three platform constraints that each made the
run silently meaningless rather than failing loudly:

- The injection webhook's namespaceSelector requires `rossoctl-enabled=true` on
  the namespace. Without it the pod came up with no sidecar at all, so every
  assertion would have been measuring an unprotected workload.
- `rossoctl.io/type` cannot be applied by hand: the agent-label-protection
  ValidatingAdmissionPolicy rejects it and directs you to use an AgentRuntime CR.
  Injection is now driven through the CR, which is also how agents are really
  deployed.
- Readiness is not a usable gate. The AgentRuntime controller labels the pod
  template only after the Deployment exists, so the first ready pod predates
  injection. The wait now requires the authbridge-proxy container to be present.

Also swaps the agent and probe images for one already cached on Kind nodes
(nginx-unprivileged:alpine, whose busybox wget doubles as the probe), so the
suite needs no registry pull, and has the stand-in honor PORT — without that the
reverse-proxy control cannot be exercised at all, since an agent that ignores
PORT collides with AuthBridge on the stolen port and never starts.

Documents the onboarding prerequisite found while debugging: the injected sidecar
mounts a per-agent Keycloak client-credentials Secret, and where the operator's
client-registration path is broken (e.g. the Keycloak CRD is absent, as on a
cluster installed with the community provider) every injected pod stays Pending
on FailedMount regardless of this feature. That is what blocked the live traffic
assertions on the dev cluster used here.

Refs: rossoctl/cortex#330

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
First live run surfaced three problems — two in the suite, one in the platform.

Retargets pre-onboarded namespaces (team1/team2, overridable) instead of creating
its own. A fresh namespace lacks the platform's per-namespace plumbing
(authbridge-config, and the Keycloak client registration that produces each
agent's credentials Secret), so an injected pod there never starts — for reasons
unrelated to this feature. Each fixture flips inboundInterception in place and
restores the original body on teardown, since these namespaces are shared and a
leftover flip would silently change every other agent in them.

Fixes an assertion that could not pass even on correct behavior:
test_agent_keeps_its_own_port asserted PORT was absent, but the stand-in agent
declares PORT itself — it must, or the reverse-proxy control cannot be exercised.
Now asserts the operator did not REWRITE it, which is the actual discriminator
(port stealing overwrites it with originalPort+1).

Removes two silent skips. The chain and egress-guard tests exec'd iptables-save
in the sidecar, whose image has no iptables, so they could only ever skip —
quietly dropping both assertions from a green run. They now assert on
proxy-init's own report, which is portable and meaningful because that container
runs require_jump guards that abort on a rule that did not land. The egress test
additionally checks that egress setup completed BEFORE inbound setup began, since
the ambient DNAT is installed at the head of the egress chain.

Adds TI_STUB_CREDENTIALS=1 for clusters where Keycloak client registration is
broken. Opt-in on purpose: stubbing by default would let the suite go green on a
broken cluster. Sound for these assertions (the Secret is for outbound
token-exchange; inbound rejects a request with no Authorization header before any
IdP contact) but explicitly not for a test needing a valid token. Without the
flag the suite skips with that cause named, rather than failing and pointing
suspicion at the interception rules.

Result on Kind: 10 passed, 0 skipped.

Refs: rossoctl/cortex#330

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
CI's `ruff format --check` (pinned 0.15.12) flagged both new files. Formatting
only — no logic change; suite still 10 passed on Kind.

Refs: rossoctl/cortex#330

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
The most important one: this suite gated nothing. Every other e2e suite in the
repo is reachable from a runner (openshell/ and token_exchange/ each have one);
transparent_inbound/ was referenced by no workflow or script, so it ran only when
a human typed the command — which is not what a regression gate is for.

Added to the shared target list in 90-run-e2e-tests.sh, so it now runs wherever
that runner does (Kind and HyperShift e2e, release validation). That is only safe
because the suite self-gates: it runs against whatever images a cluster happens to
have, and an operator that predates transparent inbound silently ignores the
namespace flip and port-steals instead, which would fail the transparent
assertions for a reason unrelated to the code under test. Detected from the
injected pod (the sidecar declares transparent-in only when the feature is
present) and skipped with the cause named. It becomes a real gate as soon as a
cluster's operator and authbridge carry it.

Two correctness fixes in the credential stub:

- It leaked. Teardown restored the namespace config and deleted the workload but
  never the placeholder Secret, so a fake credential outlived the run in a shared
  namespace. Now recorded on creation and removed on teardown.
- "already exists" was matched against stdout, but kubectl writes it to stderr,
  so the second poll onward always read as failure and re-attempted the create
  every 3s. Keyed on the exit code via a new kubectl_rc helper.

_set_mechanism was not idempotent: it prepended the mechanism keys to the existing
body, so with TI_KEEP=1 or after a killed run that skipped teardown, the next run
produced duplicate top-level YAML keys. It now strips any it finds first.

Removed _namespace_config, which was dead after the retarget to pre-onboarded
namespaces — and which built exactly the synthetic config its sibling
_set_mechanism's docstring argues against, so leaving it invited someone to use it.

Three assertions that could pass while the thing they check is broken:

- "9091" in logs matched the whole log, where that number appears in plenty of
  other contexts, so it never actually checked the exempt list. Now parses the
  "exempt sidecar ports=" field.
- logs.index() raises ValueError when a marker is missing, so the ordering
  assertion's message could never print and the failure surfaced as an unrelated
  traceback. Uses find() with an explicit presence check.
- The reverse-proxy control asserted status != 401, which would stay green if the
  bypass were closed with a 403 or the port stopped answering at all — the control
  would silently stop being a control. Now asserts 200.

10 passed on Kind after the changes, and the stub Secret is confirmed removed on
teardown.

Refs: rossoctl/cortex#330

Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
@huang195
huang195 force-pushed the feat/transparent-inbound-e2e branch from 3a828db to c8bea74 Compare August 19, 2026 16:49

@cwiklik cwiklik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Excellent, strict E2E suite for the transparent-inbound boundary (companion to operator#511 / cortex#776). The load-bearing test and its control are exactly right, and the design decisions in the body (two agents/two namespaces, probe from a separate pod not loopback, PORT-honoring stand-in) are all faithfully implemented. Approving — the tests are strong and this is test-only.

Verified strict:

  • test_direct_pod_dial_is_validated — dials the agent's real podIP:port from a separate probe pod with no auth header and asserts status != 200 and status in (401, 403) (specific codes, not a loose "not 5xx").
  • test_reverse_proxy_control_bypass_is_reachable — a genuine contrasting control: asserts the relocated port != AGENT_PORT (it really is port-stealing) and status == 200, with a comment on why a degrading control (!= 401) would be wrong.
  • test_service_routed_request_is_validated — (401, 403). Fixtures clean up (restore shared-namespace config, delete stub Secret, --rm probes), waits are deadline-bounded, and the only "secret" is an opt-in placeholder — good hygiene.

Main concern — gate robustness, not assertion quality (fast-follow): this suite is a security gate that can silently disarm itself on a cluster that is supposed to have the feature:

  • _require_platform_support reads a missing transparent-in sidecar port as "platform predates the feature" and skips — but on a branch-built CI cluster that is a regression, and it would skip rather than fail. It can't distinguish feature-absent from feature-broken.
  • _wait_ready skips when the Keycloak-credentials Secret can't be created; if the CI cluster lacks working Keycloak registration, every injected pod stays Pending and the entire suite skips green — the boundary test never runs. Nothing in 90-run-e2e-tests.sh sets TI_STUB_CREDENTIALS=1.

Neither can make the security test pass falsely — it becomes a named SKIP — but a SKIP reads as "not a failure," and nothing positively asserts the transparent path actually executed. The shell comment's "becomes a real gate as soon as they carry the feature" isn't enforced anywhere. Recommend a fast-follow: a CI flag (e.g. TI_REQUIRE_FEATURE=1) that converts these two skips into hard failures for branch-built images, and/or set TI_STUB_CREDENTIALS=1 in the runner if the CI cluster has no Keycloak CRD. (You reported 10 passed / 0 skipped on Kind, so the gate does execute in your env — this is about keeping it armed in shared CI over time.)

Minor:

  • test_health_port_not_gated / test_session_api_not_gated assert only not in (401, 403), so a crash-looping 5xx passes — worth also asserting < 500.
  • _set_mechanism's empty-config skip can fire on a transient kubectl error (check=False).
  • Stale module docstring says "scratch namespace," but the suite mutates the shared team1/team2 namespaces (contradicts the README and the teardown). Worth fixing so a reader doesn't think teardown nukes a scratch ns.

Author: huang195 (MEMBER — maintainer)
Areas reviewed: Python E2E tests, Shell (CI runner), test quality / skip-safety, fixtures & secrets
CI: 23 green; E2E HyperShift pending maintainer /run-e2e.

@cwiklik
cwiklik merged commit 012286c into rossoctl:main Aug 19, 2026
25 of 26 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Aug 19, 2026
@huang195
huang195 deleted the feat/transparent-inbound-e2e branch August 19, 2026 17:54
huang195 added a commit to huang195/kagenti that referenced this pull request Aug 20, 2026
The suite was inert: all 13 tests skipped on every shared Kind e2e run, and
had been since rossoctl#2393 merged. Root cause is not flakiness, as the earlier
skip message claimed, but a deterministic and reproducible one.

With SPIRE enabled, the operator's ClientRegistration controller derives the
Keycloak client ID from the Deployment pod template's serviceAccountName and
refuses on "default":

  "msg":"cannot resolve Keycloak client id yet"
  "reason":"SPIRE enabled: set spec.template.spec.serviceAccountName to a
            dedicated ServiceAccount (not default) on the workload for a
            stable SPIFFE client ID"

It then requeues every 30s forever at Info level, so the per-agent
credentials Secret is never created and the injected pod never leaves
FailedMount. The fixtures' Deployment set no serviceAccountName, so they hit
this every time; the platform's own agent deploy scripts create a dedicated
SA for exactly this reason.

Worth recording because it cost hours: the AuthBridge webhook DOES create a
per-agent SA and set it on the pod, and pre-populates the annotation naming
the Secret -- but it never touches the Deployment template the controller
reads. So the two halves of one feature disagree, the pod is promised a
Secret the controller has already declined to create, and nothing surfaces an
error. That split is a platform defect, filed separately; setting the SA in
the manifest is the half this suite controls.

Verified on kind: 13 passed, 0 skipped, with NO TI_STUB_CREDENTIALS -- real
controller-issued credentials, and the Secret hash matches the one the
webhook had already pre-populated. Both shared namespaces restore clean.

Also:
- Teardown deletes the ServiceAccount. Nothing else does: the webhook creates
  per-agent SAs with no ownerReference, so they outlive the workload. Eight
  had leaked across team1/team2 during development. The credentials Secret
  needs no entry -- the controller owner-references it to the Deployment.
- Rewrite the skip message and README. Both named causes that were wrong:
  "intermittent on Kind" and a missing k8s.keycloak.org CRD. The CRD is not
  in this path at all -- the controller uses Keycloak's admin REST API. They
  now point at the controller log, which prints the real reason verbatim.

Signed-off-by: Hai Huang <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
huang195 added a commit to huang195/kagenti that referenced this pull request Aug 20, 2026
The suite was inert: all 13 tests skipped on every shared Kind e2e run, and
had been since rossoctl#2393 merged. Root cause is not flakiness, as the earlier
skip message claimed, but a deterministic and reproducible one.

With SPIRE enabled, the operator's ClientRegistration controller derives the
Keycloak client ID from the Deployment pod template's serviceAccountName and
refuses on "default":

  "msg":"cannot resolve Keycloak client id yet"
  "reason":"SPIRE enabled: set spec.template.spec.serviceAccountName to a
            dedicated ServiceAccount (not default) on the workload for a
            stable SPIFFE client ID"

It then requeues every 30s forever at Info level, so the per-agent
credentials Secret is never created and the injected pod never leaves
FailedMount. The fixtures' Deployment set no serviceAccountName, so they hit
this every time; the platform's own agent deploy scripts create a dedicated
SA for exactly this reason.

Worth recording because it cost hours: the AuthBridge webhook DOES create a
per-agent SA and set it on the pod, and pre-populates the annotation naming
the Secret -- but it never touches the Deployment template the controller
reads. So the two halves of one feature disagree, the pod is promised a
Secret the controller has already declined to create, and nothing surfaces an
error. That split is a platform defect, filed separately; setting the SA in
the manifest is the half this suite controls.

Verified on kind: 13 passed, 0 skipped, with NO TI_STUB_CREDENTIALS -- real
controller-issued credentials, and the Secret hash matches the one the
webhook had already pre-populated. Both shared namespaces restore clean.

Also:
- Teardown deletes the ServiceAccount. Nothing else does: the webhook creates
  per-agent SAs with no ownerReference, so they outlive the workload. Eight
  had leaked across team1/team2 during development. The credentials Secret
  needs no entry -- the controller owner-references it to the Deployment.
- Rewrite the skip message and README. Both named causes that were wrong:
  "intermittent on Kind" and a missing k8s.keycloak.org CRD. The CRD is not
  in this path at all -- the controller uses Keycloak's admin REST API. They
  now point at the controller log, which prints the real reason verbatim.

Signed-off-by: Hai Huang <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Hai Huang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants