Skip to content

Commit cb6fd5f

Browse files
committed
fix(cni): handle CniSidecar in upstream-proxy-auth secret mode
Rebase integration: main added an upstream-proxy credential Secret whose defaultMode is chosen by a match on SupervisorTopology that only handled Combined and Sidecar. Add the CniSidecar arm — it uses the same sidecar runtime model as Sidecar (the non-root network supervisor reads the credential via the pod fsGroup), so it takes the same 0o440 mode. Restores an exhaustive match after the rebase onto main. Signed-off-by: Russell Bryant <rbryant@redhat.com>
1 parent 009bf0a commit cb6fd5f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • crates/openshell-driver-kubernetes/src

‎crates/openshell-driver-kubernetes/src/driver.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3790,7 +3790,9 @@ fn sandbox_template_to_k8s_with_validated_config(
37903790
// required for its non-root network supervisor.
37913791
let default_mode = match params.topology {
37923792
SupervisorTopology::Combined => 0o400,
3793-
SupervisorTopology::Sidecar => 0o440,
3793+
// cni-sidecar uses the same sidecar runtime model as Sidecar: the
3794+
// non-root network supervisor reads the credential via the pod fsGroup.
3795+
SupervisorTopology::Sidecar | SupervisorTopology::CniSidecar => 0o440,
37943796
};
37953797
volumes.push(serde_json::json!({
37963798
"name": UPSTREAM_PROXY_AUTH_VOLUME_NAME,

0 commit comments

Comments
 (0)