Skip to content

When creating an external traffic network policy, now only use a single existing Otterize network policy to determine the pod selector used by the external traffic network policy as all of the different pod selectors are equivalent#575

Merged
zohar7ch merged 3 commits intomainfrom
orisho/only_create_one_netpol_when_multiple_valid_pod_selectors_exist_for_external_traffic_policy
Apr 1, 2025

Conversation

@orishoshan
Copy link
Copy Markdown
Collaborator

@orishoshan orishoshan commented Mar 16, 2025

Description

This PR does not have any behavioral affect on the intents-operator.
Before this change, when we had to create an external traffic network policy, we used to create one and modify it many times based on existing network policies selectors.
No we only choose one selector from one existing network policy, and create the network policy only once, thus reducing the number of operations we perform in the cluster.
It also makes the code more clear and easy to understand.

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR and in github.com/otterize/docs

@zohar7ch zohar7ch force-pushed the orisho/only_create_one_netpol_when_multiple_valid_pod_selectors_exist_for_external_traffic_policy branch from bfc5c9a to 161c096 Compare April 1, 2025 08:39
@zohar7ch zohar7ch marked this pull request as ready for review April 1, 2025 08:42
@zohar7ch zohar7ch force-pushed the orisho/only_create_one_netpol_when_multiple_valid_pod_selectors_exist_for_external_traffic_policy branch 2 times, most recently from 4f0a8eb to a887330 Compare April 1, 2025 13:53
orishoshan and others added 3 commits April 1, 2025 17:13
…le existing Otterize network policy to determine the pod selector used by the external traffic network policy as all of the different pod selectors are equivalent.
@zohar7ch zohar7ch force-pushed the orisho/only_create_one_netpol_when_multiple_valid_pod_selectors_exist_for_external_traffic_policy branch from a887330 to 89b2f4b Compare April 1, 2025 14:14
@zohar7ch zohar7ch merged commit 6c5b07a into main Apr 1, 2025
22 checks passed
@zohar7ch zohar7ch deleted the orisho/only_create_one_netpol_when_multiple_valid_pod_selectors_exist_for_external_traffic_policy branch April 1, 2025 14:38
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants