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>
* 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>
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.
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>
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>
* 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>
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>