spidernet-io / spiderpool

Underlay and RDMA network solution of the Kubernetes, for bare metal, VM and any public cloud
https://spidernet-io.github.io/spiderpool/
Apache License 2.0
538 stars 75 forks source link

Add a pod mutating webhook to auto inject the pod network resources #4179

Closed cyclinder closed 3 weeks ago

cyclinder commented 1 month ago

Thanks for contributing!

Notice:

What issue(s) does this PR fix:

Fixes https://github.com/spidernet-io/spiderpool/issues/4177

Special notes for your reviewer:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 54.96183% with 118 lines in your changes missing coverage. Please review.

Project coverage is 79.21%. Comparing base (b63d30e) to head (c997b6c). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/podmanager/utils.go 66.97% 65 Missing and 6 partials :warning:
pkg/podmanager/pod_webhook.go 0.00% 47 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179/graphs/tree.svg?width=650&height=150&src=pr&token=YKXY2E4Q8G&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io)](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io) ```diff @@ Coverage Diff @@ ## main #4179 +/- ## ========================================== - Coverage 80.34% 79.21% -1.13% ========================================== Files 51 52 +1 Lines 5637 5899 +262 ========================================== + Hits 4529 4673 +144 - Misses 941 1053 +112 - Partials 167 173 +6 ``` | [Flag](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io) | `79.21% <54.96%> (-1.13%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files with missing lines](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io) | Coverage Δ | | |---|---|---| | [pkg/podmanager/pod\_manager.go](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179?src=pr&el=tree&filepath=pkg%2Fpodmanager%2Fpod_manager.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io#diff-cGtnL3BvZG1hbmFnZXIvcG9kX21hbmFnZXIuZ28=) | `94.38% <ø> (ø)` | | | [pkg/podmanager/pod\_webhook.go](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179?src=pr&el=tree&filepath=pkg%2Fpodmanager%2Fpod_webhook.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io#diff-cGtnL3BvZG1hbmFnZXIvcG9kX3dlYmhvb2suZ28=) | `0.00% <0.00%> (ø)` | | | [pkg/podmanager/utils.go](https://app.codecov.io/gh/spidernet-io/spiderpool/pull/4179?src=pr&el=tree&filepath=pkg%2Fpodmanager%2Futils.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spidernet-io#diff-cGtnL3BvZG1hbmFnZXIvdXRpbHMuZ28=) | `65.98% <66.97%> (+7.36%)` | :arrow_up: |
weizhoublue commented 3 weeks ago

如果 multusconfig 配置中没有 rdma resource, 是否也能 正常工作 ?