Skip to content

Conversation

@jaer-tsun
Copy link
Contributor

@jaer-tsun jaer-tsun commented Jan 22, 2020

What this PR does / why we need it:
NPM was not restricting the network policies effect by namespace.

Which issue this PR fixes
fixes Azure/AKS#1387

@jaer-tsun jaer-tsun requested a review from matmerr January 22, 2020 01:37
iptPartialPodSpec := craftPartialIptEntrySpecFromSelector(ns, toRule.PodSelector, util.IptablesDstFlag, false)
iptPartialNsComment := craftPartialIptablesCommentFromSelector(ns, toRule.NamespaceSelector, true)
iptPartialPodComment := craftPartialIptablesCommentFromSelector(ns, toRule.PodSelector, false)
// we pass true for the podspec and comment here because it's a combo of both selectors and not limited to network policy namespace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass empty

@jaer-tsun jaer-tsun merged commit dd1777c into Azure:master Jan 25, 2020
@jaer-tsun jaer-tsun deleted the namespaceLeak branch January 25, 2020 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AKS - Networkpolicies: PodSelector does not only apply to provided namespace

2 participants