16
16
- [ Design Details] ( #design-details )
17
17
- [ Validations] ( #validations )
18
18
- [ Test Plan] ( #test-plan )
19
+ - [ Prerequisite testing updates] ( #prerequisite-testing-updates )
20
+ - [ Unit tests] ( #unit-tests )
21
+ - [ e2e tests] ( #e2e-tests )
19
22
- [ Graduation Criteria] ( #graduation-criteria )
20
23
- [ Alpha] ( #alpha )
21
24
- [ Beta] ( #beta )
@@ -181,6 +184,12 @@ The `NetworkPolicyPort` will need to be validated, with the following scenarios:
181
184
182
185
### Test Plan
183
186
187
+ [ X] I/we understand the owners of the involved components may require updates to
188
+ existing tests to make this code solid enough prior to committing the changes necessary
189
+ to implement this enhancement.
190
+
191
+ ##### Prerequisite testing updates
192
+
184
193
Unit tests:
185
194
* test API validation logic
186
195
* test API strategy to ensure disabled fields
@@ -189,6 +198,15 @@ E2E tests:
189
198
* Add e2e tests exercising only the API operations for port ranges. Data-path
190
199
validation should be done by CNIs.
191
200
201
+ ##### Unit tests
202
+
203
+ - ` pkg/apis/networking/validation/validation ` : ` 14/Jun/2022 ` - ` 92.5% `
204
+ - ` pkg/registry/networking/networkpolicy/strategy ` : ` 14/Jun/2022 ` - ` 75.9% `
205
+
206
+ ##### e2e tests
207
+
208
+ - test/e2e/network/netpol/network_policy_api.go: Test is optional as per the whole Network Policy suite
209
+
192
210
193
211
### Graduation Criteria
194
212
@@ -257,7 +275,6 @@ start working incorrectly. This is a fail-closed failure, so it is acceptable.
257
275
258
276
### Rollout, Upgrade and Rollback Planning
259
277
260
- _ This section must be completed when targeting beta graduation to a release._
261
278
###### How can a rollout or rollback fail? Can it impact already running workloads?
262
279
Not probably, but still there's the risk of some bug that fails validation,
263
280
or conversion function crashes.
@@ -276,13 +293,17 @@ _This section must be completed when targeting beta graduation to a release._
276
293
277
294
### Monitoring Requirements
278
295
279
- _ This section must be completed when targeting beta graduation to a release._
280
296
###### How can an operator determine if the feature is in use by workloads?
281
297
282
298
283
299
Operators can determine if NetworkPolicies are making use of EndPort creating
284
300
an object specifying the range and validating if the traffic is allowed within
285
- the specified range
301
+ the specified range.
302
+
303
+ Also Network Policy object now supports (as alpha) status/condition fields, so
304
+ Network Policy providers can add a feedback to the user whether the policy was processed
305
+ correctly or not. Providing this feedback is optional and depends on implementation
306
+ by each NPP.
286
307
287
308
###### How can someone using this feature know that it is working for their instance?
288
309
@@ -293,8 +314,11 @@ _This section must be completed when targeting beta graduation to a release._
293
314
look into CNI metrics to check if the rules are being applied correctly, like Calico
294
315
that provides metrics like ` felix_iptables_restore_errors ` that can be used to
295
316
verify if the amount of restoring errors raised after the feature being applied.
296
- We might need in a future to add some Status field that allows CNI providers to provide
297
- feedback about the functionality
317
+ For NetworkPolicy Providers that doesn't support this feature, a new status field was added
318
+ in Network Policy object allowing the providers to give feedback to users using conditions.
319
+ Any NPP that does not support this feature should add a condition on the Network Policy
320
+ object.
321
+
298
322
299
323
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
300
324
@@ -362,7 +386,7 @@ of this feature?**
362
386
lead to undesired Network Policy, blocking previously working rules.
363
387
364
388
## Implementation History
365
- - 2022-01-31 Propose GA graduation
389
+ - 2022-06-14 Propose GA graduation
366
390
- 2021-05-11 Propose Beta graduation and add more Performance Review data
367
391
- 2020-10-08 Initial [ KEP PR] ( https://github.com/kubernetes/enhancements/pull/2079 )
368
392
0 commit comments