Skip to content

Commit b515fce

Browse files
committed
test(kubernetes): assert the tenant OIDC UID header on the control plane
The render matrix proves the chart emits --requestheader-uid-headers, but nothing checked that the flag survives the path a real tenant takes: aggregated API admission of spec.oidc, the HelmRelease, and the rendered KamajiControlPlane. Assert it in both OIDC end-to-end suites, next to the existing --authentication-config check on the same resource. Neither suite starts a Kamaji control plane, so this covers the object the chart produces, not an apiserver booting with the flag. Both tenants pin Kubernetes v1.35, where RemoteRequestHeaderUID is enabled by default, so only the header flag is expected. Assisted-By: Claude <[email protected]> Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 42864c9 commit b515fce

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎hack/e2e-chainsaw/kubernetes-oidc-customconfig/chainsaw-test.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ spec:
6161
spec:
6262
apiServer:
6363
(contains(extraArgs, '--authentication-config=/etc/kubernetes/authentication-config/config.yaml')): true
64+
# CustomConfig gets the aggregation-layer UID header on the same
65+
# terms as System. This tenant runs v1.35, where the
66+
# RemoteRequestHeaderUID gate is on by default, so the chart
67+
# renders the header flag alone.
68+
(contains(extraArgs, '--requestheader-uid-headers=X-Remote-Uid')): true
6469

6570
- name: authn-config-secret-carries-tenant-issuer
6671
try:

‎hack/e2e-chainsaw/kubernetes-oidc-system/chainsaw-test.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ spec:
7373
# --authentication-config is appended to extraArgs; the
7474
# chart-owned mount lands on extraVolumeMounts.
7575
(contains(extraArgs, '--authentication-config=/etc/kubernetes/authentication-config/config.yaml')): true
76+
# Without this flag the apiserver never publishes
77+
# requestheader-uid-headers, and the user's UID is dropped on the
78+
# way to an aggregated apiserver. This tenant runs v1.35, where
79+
# the RemoteRequestHeaderUID gate is on by default, so the chart
80+
# renders the header flag alone.
81+
(contains(extraArgs, '--requestheader-uid-headers=X-Remote-Uid')): true
7682
(extraVolumeMounts[?name == 'authentication-config']):
7783
- name: authentication-config
7884
deployment:

0 commit comments

Comments
 (0)