Skip to content

Support setting restrictions on the source for automatically created network policies for services backing webhooks and support setting control plane IPv4 CIDR prefix length for better control-plane matching #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 4, 2025

Conversation

zohar7ch
Copy link
Contributor

Description

Support setting restrictions on the source for automatically created network policies for services backing webhooks:

The intents-operator may create a network policy for allowing traffic for services backing a webhook.
This new flag will mark the operator whether to restrict this network policy, so only traffic from the control-plane would be allowed, or to allow all services to access the service.

Support setting control plane IPv4 CIDR prefix length:
The nerwork mapper and the intents-operator need to match IP addresses to the control plane on some occasions. For this matching, we are using the CIDR with the prefix length.
On some platform, like GKE, you need to set the prefix length so the matching would recognize a workload as the control plane correctly, for example on GKE https://cloud.google.com/kubernetes-engine/docs/best-practices/networking

References

Checklist

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

zohar7ch added 3 commits May 29, 2025 17:16
…network

policies for services backing webhooks

The intents-operator may create a network policy for allowing traffic
for services backing a webhook.
This new flag will mark the operator whether to restrict this network
policy, so only traffic from the control-plane would be allowed, or to
allow all services to access the service.
The nerwork mapper and the intents-operator need to match IP addresses
to the control plane on some occasions. For this matching, we are using
the CIDR with the prefix length.
On some platform, like GKE, you need to set the prefix length so the
matching would recognize a workload as the control plane correctly, for
example on GKE https://cloud.google.com/kubernetes-engine/docs/best-practices/networking
@zohar7ch zohar7ch requested a review from omris94 June 3, 2025 06:23
@zohar7ch zohar7ch merged commit 10bf216 into main Jun 4, 2025
10 checks passed
@zohar7ch zohar7ch deleted the zohar7ch/auto-allow-webhook-traffic branch June 4, 2025 12:15
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 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