Skip to content

Commit

Permalink
Include service subnet to be open for namespaceSelector set to all.
Browse files Browse the repository at this point in the history
For OVN Ocatvia provider we need to include service subnet as well,
otherwise we will end up in no connectivity to services from pods where
network policy which define egress to all namespaces was applied.

Change-Id: Ic1d1803c178a9b8375f2a08e021f0a046fd7ff02
Related-Bug: 1915008
  • Loading branch information
gryf committed Apr 8, 2021
1 parent 47c427d commit bfe2e25
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kuryr_kubernetes/controller/drivers/network_policy.py
Expand Up @@ -204,9 +204,8 @@ def _parse_selectors(self, rule_block, rule_direction, policy_namespace):
# service subnet.
allowed_cidrs = utils.get_subnetpool_cidrs(
CONF.namespace_subnet.pod_subnet_pool)
if CONF.octavia_defaults.enforce_sg_rules:
allowed_cidrs.append(utils.get_subnet_cidr(
CONF.neutron_defaults.service_subnet))
allowed_cidrs.append(utils.get_subnet_cidr(
CONF.neutron_defaults.service_subnet))
elif namespace_selector:
selectors = True
if pod_selector:
Expand Down

0 comments on commit bfe2e25

Please sign in to comment.