Commit d34c61f
authored
feat: CNS RequestIPAddress branching for MT/V2 (#2300)
* fix overlay IPAM not reporting version
* revert file and var naming, add correct path to makefile
* proposal design for multitenant IPAM flow
* change podipinfo + linter issue
* pointer issues for printf
* update IPAM branching
* remove comments
* pod client placeholder
* address lint issue for httpservicefake
* getting pod info in validator
* linter issue
* update network container contract
* renaming
* mtpnc changes
* rebase
* revert file and var naming, add correct path to makefile
* add default route
* add unit tests
* update unit tests for ipam
* go get to fix linter
* go mod tidy
* update routes
* update routes
* remove stale comments + remove redundant method
* add contexts + change address type
* addressed review
* embedded client to mock + enum for address type
* fix error
* change addressType to NICType
* change isDefaultRoute to SkipDefaultRoutes
* address comments
* refractor: make changes according to cni/cns contract
* refractor: make adding route its own func + move swift v2 ipam branching to after normal ipam flow
* refractor: change vars naming
* refractor: more var naming
* test: add test for podv6cidr
* refractor: make the returning podIpInfo init cleaner in swiftv2.go
* refractor + tests: add contexts to ipconfigs req validators + set route tests
* refractor: change labels for swift v2 pods
* fix: fix swift v2 UT
* refractor: add v4/v6 distinction for service cidr
* rebase
* revert file and var naming, add correct path to makefile
* rebase
* revert file and var naming, add correct path to makefile
* change podipinfo + linter issue
* update IPAM branching
* pod client placeholder
* getting pod info in validator
* linter issue
* rebase
* revert file and var naming, add correct path to makefile
* refractor: fix conflicts
* refractor: revert podwatcher code changes
* docs: change comment
* refractor: change CIDR to CDIRs
* refractor: parse CIDRs as semicolons separated string from env in SetRoutes
* docs: add minor comment
* refractor: change separator for parsing CIDRs
* feat: add rbac roles
* fix: gofumpt
* fix: update clusterrole
* fix: add namespace to clusterrolebinding
* fix: UT
* fix: add labels toswift v2 clusterrole
* fix: release default ipconfig early if getting swiftv2 ipconfig failed
* test: add more UT
* fix: parsing MTPNC as CIDR instead
* fix: toggle skipDefaultRoutes for infraNic to true
* fix: add route for node cidr in ipv4 podipconfig
* feat: add node cidrs route
* fix: linter
* address comments
* fix: minor logs formatting
* feat: move cns yaml for swiftv2 scenario to a diff file + more logging for swiftv2middleware
* fix: log debugf to printf
* fix: add testmain to avoid nil pointer error for loggers
* Update azure-cns.yaml
Signed-off-by: Quang Nguyen <[email protected]>
* fix: move parseCIDRs to a common package, use net/netip instead of net
* fix: exhaustive all switch case for nic type
* fix: exhaustive all switch case for nic type
* refractor: change fmt.Errorf to errors.Wrapf
* fix: add mtpnc status check in validator + use netip package
* fix: minor
* revert: azure-cns.yaml
---------
Signed-off-by: Quang Nguyen <[email protected]>
Signed-off-by: Quang Nguyen <[email protected]>1 parent 7e5994d commit d34c61f
File tree
21 files changed
+1184
-55
lines changed- cni
- cns
- configuration
- fakes
- middlewares
- mock
- utils
- restserver
- service
21 files changed
+1184
-55
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| |||
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
258 | 265 | | |
259 | 266 | | |
260 | 267 | | |
| |||
292 | 299 | | |
293 | 300 | | |
294 | 301 | | |
| 302 | + | |
295 | 303 | | |
296 | 304 | | |
297 | 305 | | |
| |||
453 | 461 | | |
454 | 462 | | |
455 | 463 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
461 | 470 | | |
462 | 471 | | |
463 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
20 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| |||
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments