Restore ConfigMap enable-multi-networkpolicy setting for ovn-kubernetes - #3100
Restore ConfigMap enable-multi-networkpolicy setting for ovn-kubernetes#3100weliang1 wants to merge 1 commit into
Conversation
PR openshift#3072 migrated the MultiNetworkPolicy enablement from ConfigMap to CLI flags, but this created a regression because ovn-kubernetes prioritizes ConfigMap settings over CLI flags during config loading. When useMultiNetworkPolicy is enabled, the CNO now passes both: - CLI flag: --enable-multi-networkpolicy (added by PR openshift#3072) - ConfigMap: enable-multi-networkpolicy=true (restored by this PR) This ensures ovn-kubernetes loads EnableMultiNetworkPolicy=true regardless of config loading order, allowing MultiNetworkPolicy enforcement on UDN (User Defined Network) Layer2 secondary interfaces. Fixes: Test 77656 - ipBlock ingress policy for UDN pod's secondary interface Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting Summary by CodeRabbit
WalkthroughThe OVN managed and self-hosted configuration templates now conditionally add ChangesOVN multi-network policy configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: weliang1 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary
This PR restores the
enable-multi-networkpolicy=trueConfigMap setting that was removed by PR #3072, fixing a regression where MultiNetworkPolicy is not enforced on UDN (User Defined Network) Layer2 secondary interfaces.Problem
PR #3072 attempted to migrate MultiNetworkPolicy enablement from ConfigMap to CLI flags by:
--enable-multi-networkpolicyenable-multi-networkpolicy=trueHowever, this created a regression because ovn-kubernetes prioritizes ConfigMap settings over CLI flags during config loading. When the ConfigMap doesn't specify the setting, it defaults to
false, causing the CLI flag to be ignored.Evidence
After PR #3072 merged, when
useMultiNetworkPolicy: trueis enabled:Result: MultiNetworkPolicy created but not enforced → test 77656 fails (traffic not blocked).
Solution
Restore the ConfigMap setting alongside the CLI flag, ensuring dual coverage:
--enable-multi-networkpolicy(from PR OCPBUGS-88063: ovn-kubernetes: Move MNP from ConfigMap to CLI flags #3072)enable-multi-networkpolicy=true(restored by this PR)This ensures ovn-kubernetes loads
EnableMultiNetworkPolicy=trueregardless of config loading order.Test Plan
Before this fix:
# Test 77656: Verify ingress-ipblock policy for UDN pod's secondary interface (Layer2) FAIL: Expected curl to fail (blocked by policy), but connection succeededAfter this fix:
Files Changed
bindata/network/ovn-kubernetes/managed/004-config.yaml: Restore ConfigMap setting (2 occurrences)bindata/network/ovn-kubernetes/self-hosted/004-config.yaml: Restore ConfigMap setting (1 occurrence)Related
77656 - Verify ingress-ipblock policy for UDN pod's secondary interface (Layer2)🤖 Generated with Claude Code