Commit Graph

940 Commits

Author SHA1 Message Date
Ayush Patel
33ce772b98
Add NOTICE (#967)
Signed-off-by: Ayush Patel <patel.ayush08@gmail.com>

Signed-off-by: Ayush Patel <patel.ayush08@gmail.com>
2022-12-08 23:50:37 +09:00
lgtm-com[bot]
b8304cf7dc
Add CodeQL workflow for GitHub code scanning (#981)
Co-authored-by: LGTM Migrator <lgtm-migrator@users.noreply.github.com>
2022-12-08 23:47:00 +09:00
Doug Smith
7ce5e9fbdc
Merge pull request #976 from s1061123/dev/simple-kubeletpkg
Simplify kubeletclient code to reduce parse url
2022-11-29 11:29:16 -05:00
Miguel Duarte Barroso
a9ace511d8
server: add healthz endpoint (#963)
From the node (or any privileged pod having mounted the multus socket)
you can now query the multus-cni server liveliness - for instance:

```
root@kind-worker:/# curl -v --unix-socket /run/multus/multus.sock localhost/healthz
*   Trying /run/multus/multus.sock:0...
* Connected to localhost (/host/run/multus/multus.sock) port 80 (#0)
> GET /healthz HTTP/1.1
> Host: localhost
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Mon, 14 Nov 2022 17:21:07 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
```

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
2022-11-29 23:34:13 +09:00
Tomofumi Hayashi
6c52c476bf Simplify kubeletclient code to reduce parse url
This removes unused variables and simplify kubeletclient code.
2022-11-28 18:05:24 +09:00
Doug Smith
c75d773248
Merge pull request #957 from s1061123/fix/948
Change conditional flow to use cache file in CmdDel
2022-11-10 11:12:15 -05:00
Tomofumi Hayashi
82c09a98b7 Change conditional flow to use cache file in CmdDel
This fix changes conditional flow to use net-attach-def if
cache file is collapsed in CmdDel.

Fix #948
2022-11-11 00:22:15 +09:00
yanggang
103e70778b
clean code (#952)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-10 01:00:27 +09:00
yanggang
40d600b336
Upgrade fsnotify (#954)
* This makes checking events a lot easier

* upgrade fsnotify package

Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-10 00:35:44 +09:00
yanggang
b6c50f2d07
we should keep the first character Big for aligned info note (#953)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-10 00:34:28 +09:00
yanggang
4f91106f29
remove io/ioutil for advanced golang (#951)
Signed-off-by: yanggang <gang.yang@daocloud.io>

Signed-off-by: yanggang <gang.yang@daocloud.io>
2022-11-10 00:18:54 +09:00
Tomofumi Hayashi
77e0150afe
Fix license boilerplate/copyright in go files (#947)
This change fix license boilerplate and its copyright.
The updated year in copyright is based on the file creation date.
If older than 2021, added copyright is transfered to multus
authors from Intel corporation as the multus code was officially
transfered to Kubernetes Networking Plumbing Working Group on
March 11, 2021.
2022-11-02 21:49:57 +09:00
Moshe Levi
6f8fa8c286
fix resource api grpc failed to connect to unix socket (#946)
After commit c6fa047212
resource api got broken in 2 places. first place handled by f530d3eb84
The second break was in replacing podresources.GetV1Client with getKubeletResourceClient.
The GetV1Client remove the protocol (e.g unix:) by calling GetAddressAndDialer, but the getKubeletResourceClient
is using the full endpoint (with the portocol) causing failed to connect to unix socket.
This patch remove the unix: prefix before the grpc connect.

Fixes: #944
Signed-off-by: Moshe Levi <moshele@nvidia.com>

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2022-11-02 21:47:55 +09:00
yulng
8550fa62a5
Modify the judgment of test results (#936) 2022-10-31 22:34:10 +09:00
Gao PeiLiang
a3f9694d09
delegate plugin delete success, delete cache file (#926) 2022-10-31 22:32:51 +09:00
Moshe Levi
fd893ab625
grpc: move to use grpc.WithTransportCredentials() (#942)
see 2c8bfad910

Signed-off-by: Moshe Levi <moshele@nvidia.com>

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2022-10-29 00:47:05 +09:00
Moshe Levi
f530d3eb84
fix kubeletSocket scope (#941)
The kubeletSocket in the function is scoping the const kubeletSocket
which causing resource api to fail with

"stat /var/lib/kubelet/pod-resources/.sock: no such file or directory"

Signed-off-by: Moshe Levi <moshele@nvidia.com>

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2022-10-26 22:25:38 +09:00
Doug Smith
e43ed9274e
Merge pull request #939 from s1061123/fix/server
Fix multus-daemon in case of user given config
2022-10-24 16:03:48 -04:00
yulng
f52aa691d6
Add "EOF" to the Cat command, otherwise the operation will fail (#932) (#934)
Add EOF to the Cat command, otherwise the operation will fail
2022-10-25 00:57:09 +09:00
Tomofumi Hayashi
46daed0654 Fix multus-daemon in case of user given config
This fix the issue #931 to refining server startup code including
file copy and channel processing, with simplification.
2022-10-25 00:46:40 +09:00
yulng
e9bb5e5f48
Add "EOF" to the Cat command, otherwise the operation will fail (#932)
Add EOF to the Cat command, otherwise the operation will fail
2022-10-23 14:58:08 +09:00
Doug Smith
fa8a6e6880
Merge pull request #925 from s1061123/dev/rc-api
Support IPs, MAC and cni-args in delegate API
2022-10-14 11:34:12 -04:00
Tomofumi Hayashi
6f90a0f075 Support IPs, MAC and cni-args in delegate API 2022-10-15 00:12:17 +09:00
Doug Smith
efa8c62ec4
Merge pull request #930 from s1061123/fix/mod-ver
Fix kubelet version in go.mod
2022-10-14 11:07:58 -04:00
Tomofumi Hayashi
7c619d64a6 Fix kubelet version in go.mod
fix #928
2022-10-14 23:32:26 +09:00
Eoghan Russell
1aac2431b8
Fix broken link in README (#919) 2022-09-26 23:26:25 +09:00
Doug Smith
f372831536
Merge pull request #915 from s1061123/fix/delegate-api
Fix deleate API to load conflist
2022-09-20 13:19:58 -04:00
Tomofumi Hayashi
3e97437e31 Fix deleate API to load conflist 2022-09-21 01:56:53 +09:00
Miguel Duarte Barroso
b1aba95892
Idiomatic config unit tests (#908)
* gomega, unit tests: use `HaveLen` matcher

The `HaveLen` matcher provides a better error msg when the test fails,
resulting in easier debugging.

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>

* gomega, unit tests: use `BeEmpty` matcher

The `BeEmpty` matcher is more idiomatic, and results in better error
msgs when the test fails.

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>

* gomega, unit tests: use `BeTrue` and `BeFalse` matchers

These matchers are more idiomatic.

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
2022-09-19 10:22:08 -04:00
Doug Smith
371123659b
Merge pull request #906 from TimFroidcoeur/fix_multiple_default_gw
fix multiple default gw
2022-09-01 16:18:38 -04:00
Tim Froidcoeur
8da20f38ea fix multiple default gw
when the configuration specifies both an IPv4 and IPv6 default route,
the IsFilterV4Gateway and IsFilterV6Gateway flags should both be false,
to allow the gateway configuration.
The logic in CheckGatewayConfig would do the inverse, setting both to
true in case of both IPv4 and IPv6 gateway.

Fixes: d52f2b6a ("Update libcni cache when default-route net selection
is used")
Signed-off-by: Tim Froidcoeur <tim.froidcoeur@tessares.net>
2022-09-01 16:50:19 +02:00
Doug Smith
d93a3bb736
Merge pull request #899 from jklare/jk_readme_thick_plugin
rephrase readme section describing thin vs thick plugin
2022-08-26 15:11:52 -04:00
Doug Smith
e882d51b3c
Merge pull request #903 from s1061123/dev/fedora-image
[WIP]Change container image to python:slim from centos
2022-08-26 14:35:23 -04:00
Tomofumi Hayashi
db7cc6bc80 Change container image to fedora from centos
This change introduce fedora container for multus image.
2022-08-27 02:57:58 +09:00
Doug Smith
33c0d1bd86
Merge pull request #900 from s1061123/fix/image-tag
Fix container tags for thick plugin
2022-08-25 11:29:17 -04:00
Tomofumi Hayashi
12c6c91586 Fix container tags for thick plugin 2022-08-25 23:07:32 +09:00
Jan Klare
2f12b5ce99
rephrase readme section describing thin vs thick plugin
Signed-off-by: Jan Klare <jan.klare@bisdn.de>
2022-08-24 14:45:26 +02:00
Doug Smith
0c515497d7
recommends thick plugin in quickstart (#894) 2022-08-24 20:23:33 +09:00
Doug Smith
68a9593f84
Merge pull request #897 from s1061123/fix/add-disclaimers
Update deployment yaml
2022-08-22 13:35:21 -04:00
Tomofumi Hayashi
95c4d0c1c5 Update deployment yaml
This change adds note section in deployment yaml to explicitly
mention the scope of this yaml.
2022-08-23 01:19:24 +09:00
Doug Smith
5498080119
Merge pull request #893 from k8snetworkplumbingwg/feature/multus-4.0
Feature/multus 4.0
2022-08-18 16:48:02 -04:00
Tomofumi Hayashi
3d9cec4ec9 Merge remote-tracking branch 'origin/master' into feature/multus-4.0 2022-08-19 00:07:30 +09:00
Tomofumi Hayashi
505ab4567c
Add delegate API in multus-daemon (#890)
This changes introduce delegate API function in multus-daemon.
This API will be consumed from other programs for hot-plug
interface into running pod. This change also cleanups server
code to split into client code and server code to easy to import
from other golang code.
2022-08-10 00:45:23 +09:00
Doug Smith
8dee74d7b9
Merge pull request #870 from s1061123/dev/doc-modified
Add 4.0 document
2022-08-01 11:19:02 -04:00
Doug Smith
fba6d66720
Merge pull request #886 from s1061123/update-libcni
Bump libcni to fetch the bugfix
2022-07-29 11:06:14 -04:00
Tomofumi Hayashi
7f7bb354c5 Bump libcni to fetch the bugfix
This change introduces https://github.com/containernetworking/cni/pull/904
to fix the issue.
2022-07-29 20:31:57 +09:00
Doug Smith
f4c0adf54c
Merge pull request #881 from chrisplo/detect-python3
Detect python3
2022-07-22 09:48:40 -04:00
Chris Plock
ac6757b9cc
Detect python3
fixes https://github.com/k8snetworkplumbingwg/multus-cni/issues/880
2022-07-15 15:13:27 -07:00
Doug Smith
70c970cd6e
Merge pull request #878 from tomkukral/print-kubeconfig
write output file for generated kubeconfig
2022-07-12 08:39:17 -04:00
Doug Smith
3deb079546
Merge pull request #876 from s1061123/dev/update-golang
Update golang version to 1.18.x
2022-07-11 16:11:44 -04:00