Problem
On ROSA HCP (and likely other managed OpenShift platforms), agent pods in proxy-sidecar mode are stuck in Init:CrashLoopBackOff because the proxy-init init container cannot initialize iptables. Neither iptables-legacy nor iptables (nft) works on managed OpenShift nodes (SELinux, missing iptable_nat module, no MachineConfig access).
proxy-sidecar is the rhoai-3.5 default (kagenti#1428, kagenti-operator#361). This blocks agent deployments on ROSA HCP.
Agreed direction
Per Slack discussion with Hai Huang (thread): add explicit cooperative mode opt-out for platforms where iptables is unavailable. Keep enforce-redirect as the default. Document security limitations.
Upstream config/runtime changes tracked in kagenti-extensions#519.
Proposed solution
Add egressEnforcement to AgentRuntime (CRD field and/or annotation):
| Value |
Behavior |
enforce-redirect (default) |
Current — mutating webhook injects proxy-init, iptables REDIRECT |
none |
Skip proxy-init; set HTTP_PROXY / HTTPS_PROXY only (cooperative) |
Operator behavior when none
- Mutating webhook does not inject
proxy-init init container
- Authbridge sidecar still injected with forward/reverse proxy listeners
HTTP_PROXY env vars point agent traffic at authbridge
- Cooperative agents → authenticated egress via token exchange
- Non-cooperative agents → direct egress → destination inbound AuthBridge rejects (401)
Security model (must be documented)
What cooperative mode provides:
- HTTP_PROXY path for agents that respect proxy settings
- Inbound AuthBridge JWT validation on destination services
- Egress NetworkPolicy can restrict L4 destinations (operator already supports agent NetworkPolicy)
Known limitations:
- NetworkPolicy is L4 — cannot distinguish authbridge vs agent traffic within the same pod network namespace
- Non-cooperative agents that target allowed destinations can exfiltrate without token exchange
- Admin must explicitly opt in and acknowledge the trade-off
Scope (this repo)
Acceptance criteria
egressEnforcement: none on AgentRuntime → agent pods reach Running on ROSA HCP (no proxy-init)
- Default unchanged (
enforce-redirect) — no behavior change on iptables-capable platforms
- Security limitations documented at opt-in point
- Validated on ROSA HCP: cooperative egress works; non-cooperative fails at destination inbound AuthBridge
References
Problem
On ROSA HCP (and likely other managed OpenShift platforms), agent pods in proxy-sidecar mode are stuck in
Init:CrashLoopBackOffbecause theproxy-initinit container cannot initialize iptables. Neitheriptables-legacynoriptables(nft) works on managed OpenShift nodes (SELinux, missingiptable_natmodule, no MachineConfig access).proxy-sidecar is the rhoai-3.5 default (kagenti#1428, kagenti-operator#361). This blocks agent deployments on ROSA HCP.
Agreed direction
Per Slack discussion with Hai Huang (thread): add explicit cooperative mode opt-out for platforms where iptables is unavailable. Keep
enforce-redirectas the default. Document security limitations.Upstream config/runtime changes tracked in kagenti-extensions#519.
Proposed solution
Add
egressEnforcementto AgentRuntime (CRD field and/or annotation):enforce-redirect(default)proxy-init, iptables REDIRECTnoneproxy-init; setHTTP_PROXY/HTTPS_PROXYonly (cooperative)Operator behavior when
noneproxy-initinit containerHTTP_PROXYenv vars point agent traffic at authbridgeSecurity model (must be documented)
What cooperative mode provides:
Known limitations:
Scope (this repo)
egressEnforcementfield to AgentRuntime API (CRD + webhook validation)proxy-initinjection (skip whennone)enforce-redirectproxy-initwhen opted outAcceptance criteria
egressEnforcement: noneon AgentRuntime → agent pods reach Running on ROSA HCP (noproxy-init)enforce-redirect) — no behavior change on iptables-capable platformsReferences