Repository navigation
test(e2e): kind e2e for the ext_authz sidecar and its roll ordering (#1275) - #1287
Merged
Merged
Conversation
…1275) e2e/authz.sh: one kind cluster, SPIRE off, the chart's OPA preset under failureMode DENY with the prober canary's allow-header policy on an extAuthz HTTPFilter. Asserts: a. allow header -> 200, none -> 403, with ext_authz ok/denied moving b. `authz` is a started native sidecar and `proxy` started after it c. with the OPA image evicted from the node (the #1275 trigger: the new pod's sidecar must pull it), a proxy rollout restart under continuous allowed requests gives ZERO 403s and ZERO new ext_authz.error, across a real hot-restart handoff (newer epoch) AUTHZ_CHARTS=<older charts/> AUTHZ_EXPECT=red inverts (c), proving the harness discriminates. Locally (kind v0.33.0, k8s 1.35.8): main's chart (2.4.8): 495 x 403, 990 ext_authz errors in 4 s this chart (2.4.9): 0 x 403, 0 errors (17,406 requests), twice Wired into the nightly e2e workflow as job `authz` (run-e2e-script, only=authz, report-failure). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1285. This PR adds the first ext_authz e2e, for #1275.
e2e/authz.shThe script follows
e2e/uds.sh: one kind cluster, SPIRE off, pinned kind and node image frome2e/kind-version.sh. It installs the chart's OPA preset withfailureMode: DENYand the prober canary's policy (allow if input.attributes.request.http.headers["x-authz"] == "letmein"). The policy guards anextAuthzHTTPFilter onauthz-echo. Assertions:a. The allow header gets 200, and a request without it gets 403.
ext_authz.okandext_authz.deniedboth move, which shows the sidecar made both decisions.b. On the live pod,
authzis a started native sidecar (initContainerStatuses,restartPolicy: Always), andproxystarted after it.c. The script evicts the OPA image from the node (
crictl rmi), which is the proxy pod: the ext_authz sidecar can start after the proxy is serving — authz errors (403 under failureMode DENY) until it is up #1275 trigger: the new pod must pull it again. It then runskubectl rollout restart ds/aether-proxywith 3 request loops sending allowed requests the whole time. Gates:http.*.ext_authz.error, read on the node Envoy's admin. Hot restart carries the counters across epochs.restart_epoch, so a real handoff happened.Then (a) runs again.
AUTHZ_CHARTS=<older charts/> AUTHZ_EXPECT=redinverts (c), so the harness can be shown to tell the two layouts apart.Local runs (kind v0.33.0 from a scratch dir, k8s 1.35.8)
Workflow
.github/workflows/e2e.yamlgets one newauthzjob (run-e2e-script,AUTHZ_SKIP_BUILD), plusauthzin theonly=options and in thereport-failureneeds and results.//e2e:kind_pin_testpasses. actionlint 1.7.12 reports no findings in the new block; its remaining findings (SC2024/SC2046 in the gateway-http and mesh-http jobs) are already on main. The proxy and OPA images are pulled from their registries, as in the other suites.Proof:
bazel test //charts/... //e2e/...82/82, lint withfail_on_violationclean,make format-checkclean. The nightly dispatch (only=authz) result is in a comment below.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr