Ignore headless services in NP code
Seems like we need special handling of headless services in NP code that is to ignore them if they have "None" string as a clusterIP. Change-Id: Ie0fddae10ebddf97e78af85d372317861749d51d Closes-Bug: 1914377
This commit is contained in:
parent
28b315ecd0
commit
1473cfc3f2
|
@ -581,7 +581,8 @@ class NetworkPolicyDriver(base.NetworkPolicyDriver):
|
||||||
if ns_name != resource['metadata']['name']:
|
if ns_name != resource['metadata']['name']:
|
||||||
continue
|
continue
|
||||||
cluster_ip = service['spec'].get('clusterIP')
|
cluster_ip = service['spec'].get('clusterIP')
|
||||||
if not cluster_ip:
|
if not cluster_ip or cluster_ip == 'None':
|
||||||
|
# Headless services has 'None' as clusterIP.
|
||||||
continue
|
continue
|
||||||
rule = driver_utils.create_security_group_rule_body(
|
rule = driver_utils.create_security_group_rule_body(
|
||||||
'egress', port, protocol=protocol,
|
'egress', port, protocol=protocol,
|
||||||
|
|
Loading…
Reference in New Issue