Skip to content

add hostPorts to SecurityPolicyException for CAPI controllers with hostNetwork#198

Merged
pabateman merged 2 commits into
mainfrom
fix/capi-controller-manager-security-policy-exception-host-ports
Jun 24, 2026
Merged

add hostPorts to SecurityPolicyException for CAPI controllers with hostNetwork#198
pabateman merged 2 commits into
mainfrom
fix/capi-controller-manager-security-policy-exception-host-ports

Conversation

@xhable137

Copy link
Copy Markdown
Contributor

When a CAPI infrastructure controller manager uses hostNetwork, container ports are accessible on the host network and are treated as hostPorts by the admission-policy-engine security policy check. The generated SecurityPolicyException only allowed hostNetwork but did not list the hostPorts, causing pod creation to fail with "hostPorts are not allowed, policy allows: []".

…stNetwork

Signed-off-by: Artem Darmanyan <artem.darmanyan@flant.com>
@xhable137 xhable137 self-assigned this Jun 22, 2026
@xhable137 xhable137 marked this pull request as ready for review June 24, 2026 09:20
Signed-off-by: Artem Darmanyan <artem.darmanyan@flant.com>
@pabateman pabateman merged commit 9ffde3d into main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants