You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-network/20200204-NetworkPolicy-verification-rearchitecture.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ The consequences of this problem is that
148
148
149
149
## A high level outline of Pod Traffic Pathways
150
150
151
-
Before diving into test details, we outline different types of pod traffic. Each one of these types of traffic may pose different bugs to a CNI provider.
151
+
One of the key reasons for better NetworkPolicy tests is to make CNI's more reliable across the board. Different types of traffic may pose different bugs to a CNI provider, under different load or security use-cases. In the future, we'd like NetworkPolicy tests to comprehensively address all of these scenarios. The work in this KEP is the first step in this direction.
152
152
153
153
Intranode
154
154
- pod -> pod
@@ -196,8 +196,8 @@ This is from the test "should enforce policy to allow traffic only from a differ
| +------+ +-------+ Figure 1a: The NetworkPolicy Tests | TODO: maybe include YAML examples side-by-side
200
-
| | | | | current logical structure only verifies | visual nomenclature (i.e., cA -> podA)
199
+
| +------+ +-------+ Figure 1a: The NetworkPolicy Tests |
200
+
| | | | | current logical structure only verifies |
201
201
| | a | | b | one of many possible network connectivity |
202
202
| | | | | requirements. Pods and servers are both |
203
203
| +--+---+ +--X----+ in the same node and namespace. |
@@ -228,10 +228,10 @@ namespaces created in the entire network policy test suite.
228
228
| | +---------------+ X of other test scenarios which |
229
229
| | | server | X guarantee that (1) There is no |
230
230
| +---> 80,81 XXXXX namespace that whitelists traffic |
231
-
| | | and that (2) there is no "pod" | TODO: test "default" namespace
232
-
| +----X--X-------+ which whitelists traffic. | check for dropped namespaces
233
-
| +------------X--X---------------+ | make test instances bidirectional
234
-
| | X X | We limit the amount of namespaces | (client/servers)
231
+
| | | and that (2) there is no "pod" |
232
+
| +----X--X-------+ which whitelists traffic. |
233
+
| +------------X--X---------------+ |
234
+
| | X X | We limit the amount of namespaces |
235
235
| | +------XXX XXX-------+ nsB| to test to 3 because 3 is the union |
236
236
| | | | X X | | | of all namespaces. |
237
237
| | | b | X X | c | | |
@@ -262,13 +262,15 @@ Note that we also don't explicitly test a few other scenarios that involve chang
262
262
- New pods obeying old policies
263
263
- Extensive changing of pod labels is keeping up with policies
264
264
265
+
We don't propose that this specific KEP implements complex temporal patterns, but, we note this here so it can be potentially addressed in a potential future KEP around performance and scalability testing of NetworkPolicies.
266
+
265
267
#### Other concrete examples of incompleteness
266
268
267
269
The above diagrams show that completeness is virtually impossible, the way the tests are written, because of the fact that each test is manually verifying bespoke cases. More concretely, however, a look at `should enforce policy to allow traffic only from a different namespace, based on NamespaceSelector [Feature:NetworkPolicy]` reveals that some tests don't do positive controls (validation of preexisting connectivity), whereas others *do* do such controls.
268
270
269
271
#### List of missing functional test cases
270
272
271
-
TODO: use multiple pods in contiguous CIDR to validate CIDR traffic matching
273
+
- Multiple pods in contiguous CIDR to validate CIDR traffic matching: Currently we do very limited CIDR policy testing.
272
274
273
275
- Stacked IPBlock case: Need to add a test case to verify the traffic when a
274
276
CIDR (say 10.0.1.0/24) is used in an ``except`` clause in one NetworkPolicy,
@@ -369,7 +371,6 @@ differentiating the stacked peers in network policy (an *or* selector) vs. a com
0 commit comments