[EV-3924] Add network policy egress rules for threat feed pull domains#4621
Open
radixo wants to merge 2 commits intotigera:masterfrom
Open
[EV-3924] Add network policy egress rules for threat feed pull domains#4621radixo wants to merge 2 commits intotigera:masterfrom
radixo wants to merge 2 commits intotigera:masterfrom
Conversation
The intrusion-detection-controller needs to reach external URLs configured in GlobalThreatFeed resources to pull threat intel. When a deny-all policy is in place, these connections are blocked. Watch GlobalThreatFeed resources and dynamically add their HTTP pull hostnames as allowed egress domains in the controller's network policy.
631b446 to
5ec9b39
Compare
rene-dekker
reviewed
Apr 1, 2026
| // URLs so that the network policy can allow egress to those domains. | ||
| func threatFeedPullDomains(feeds []v3.GlobalThreatFeed) []string { | ||
| seen := map[string]struct{}{} | ||
| for i := range feeds { |
Member
There was a problem hiding this comment.
Suggested change
| for i := range feeds { | |
| for _, feed := ranger feeds { |
Contributor
Author
There was a problem hiding this comment.
Aesthetically I'd do the way you recommended, but the Claude implemented this part it is faster, because it gets the pointer of the structure instead of copying it completely. WDYT?
rene-dekker
approved these changes
Apr 1, 2026
…ests Simplify threatFeedPullDomains by using slices.Collect(maps.Keys()) instead of manual map iteration. Add missing threatFeedAPIReady field initialization in intrusion detection controller tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intrusion-detection-controller needs to reach external URLs configured in GlobalThreatFeed resources to pull threat intel. When a deny-all policy is in place, these connections are blocked. Watch GlobalThreatFeed resources and dynamically add their HTTP pull hostnames as allowed egress domains in the controller's network policy.
Description
Release Note
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.