Commit Graph

964 Commits

Author SHA1 Message Date
Doug Smith
1655d540cb
Merge pull request #1418 from rollandf/baseimage
chore: update Dockerfile base image
2025-04-24 15:43:05 +02:00
Ben Pickard
4517063b79
Merge pull request #1419 from dougbtv/rebase5-cni-subdirectory-chain
Safe subdirectory based CNI chain configuration loading
2025-04-16 16:04:18 -04:00
dougbtv
4104fea90d Subdirectory CNI chain loading e2e tests
Adds a test for plain subdirectory chaining and also using passthru CNI with auxiliaryCNIChainName
2025-04-15 15:53:18 -04:00
dougbtv
528d4f150c Functionality for Aux CNI Chain using subdirectory based CNI configuration loading.
Removes the it `fails to execute confListDel given no 'plugins' key"` test.

This test no longer fails after libcni version 1.2.3.
It probably shouldn't failduring a DEL action as it is, we want the least error prone path.

The GC test now uses both cni.dev attachment formats.

Uses both attachment formats as per https://github.com/containernetworking/cni/issues/1101 for GC's cni.dev/valid-attachments & cni.dev/attachments
2025-04-15 15:53:00 -04:00
dougbtv
fa3c7cfee3 [bump] Bumps to libcni v1.3.0 2025-04-09 14:42:47 -04:00
Fred Rolland
96bfb26dac chore: update Dockerfile base image
- Fix CVEs

Signed-off-by: Fred Rolland <frolland@nvidia.com>
2025-04-06 16:31:47 +03:00
Doug Smith
55ef3b1f0b
Merge pull request #1370 from thomasferrandiz/add-trivy
Add trivy vulnerability scanner in build step
2025-04-03 15:35:40 +02:00
Ben Pickard
41321963b8
Merge pull request #1374 from buroa/master
fix: dockerfile change cmd to entrypoint
2025-03-31 16:15:02 -04:00
Thomas Ferrandiz
ef8f01b299 Use cross-compilation for thick plugin build 2025-03-31 15:39:41 +00:00
Thomas Ferrandiz
51752f1a6e Add trivy vulnerability scanner in build step
Signed-off-by: Thomas Ferrandiz <thomas.ferrandiz@suse.com>
2025-03-31 15:39:41 +00:00
Ben Pickard
1821311479
Merge pull request #1412 from dougbtv/fix-empty-cni-result
Properly structure empty CNI result
2025-03-25 17:42:43 -04:00
dougbtv
ccfd8f5fea When returning an empty CNI result, it must be properly structured
For a previous fix of returning an empty CNI result when pods are not found, the CNI result wasn't properly structured. This fixes the structuring.
2025-03-25 14:45:04 -04:00
Doug Smith
2a91646eaf
Merge pull request #1409 from maiqueb/bump-net-attach-def-client-lib-1.7.6
build: consume net-attach-def-client lib 1.7.6
2025-03-24 19:22:12 +01:00
Ben Pickard
47e5153714
Merge pull request #1408 from dougbtv/pod-not-found-on-add
handle pod not found during CNI ADD gracefully
2025-03-24 14:11:03 -04:00
Miguel Duarte Barroso
21f7282088 build: consume net-attach-def-client lib 1.7.6
This consumes the latest release of the network-attachment-definition-client
library which fixes a regression affecting CNI plugins that do not specify
interfaces in their CNI ADD result. This was fixed in [0].

[0] - https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/pull/77

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
2025-03-24 15:51:11 +00:00
dougbtv
641f6a3b63 handle pod not found in CNI ADD gracefully
sometimes pods get deleted super fast (like jobs or CI) and they come back as not found.

instead of erroring, just return an empty CNI result so things don't blow up.

adds a sentinel errPodNotFound and skips the rest of CmdAdd when we hit it.

shouts to race conditions.
2025-03-24 09:58:38 -04:00
Ben Pickard
e156e815ad
Merge pull request #1407 from dougbtv/pod-deleted-on-add
Tolerate issues writing network status annotation on CNI ADD.
2025-03-20 15:44:34 -04:00
dougbtv
5892d705da Tolerate issues writing network status annotation on CNI ADD.
This change adds toleration for such errors like:

```
failed to [query/update] the pod pod-name-here in out of cluster comm: pod "pod-name-here" not found
```

During CNI ADD. While this change is a trade off in terms of debugability for RBAC, it's potentially noisy in scaled clusters when it is working properly.
2025-03-20 14:20:00 -04:00
Ben Pickard
431a735eca
Merge pull request #1404 from dougbtv/fix-e2e-dra
The e2e kind config should use api/beta for the runtimeConfig
2025-03-20 12:44:42 -04:00
dougbtv
99d72d14a3 The e2e kind config should use api/beta for the runtimeConfig
Otherwise, the latest changes to DRA (which is beta in K8s 1.32) are incompatible.

Additionally, this:

* Bumps kind version to 0.27.0
* Changes `loglevel` flag to `v` verbosity flag for `kind export logs`
* fixes lint in the Dockerfile.
* adds a couple notes in the docs.
2025-03-20 11:21:03 -04:00
Doug Smith
4a0b5073af
Merge pull request #1273 from s1061123/cni110
CNI 1.1.0 support
2025-01-16 09:40:09 -05:00
Steven Kreitzer
5216844263
fix: dockerfile change cmd to entrypoint 2024-12-29 10:41:06 -07:00
Tomofumi Hayashi
7eb9673a1a Call GC command with valid attachments from multus cache
This code changes CNI's GC command argument. Previously it just
passes from parent CNI runtime, however, it may causes unexpected
resource deletion if one CNI plugin is used in both cluster
network and net-attach-def. This change generates valid attachments
from multus CNI cache and passed to delegate CNI plugin.
2024-12-20 11:28:41 +09:00
Tomofumi Hayashi
a439f91721 Support GC and STATUS command for cluster network
This change supports up to date CNI 1.1 command, GC and STATUS for
cluster network.
2024-12-20 11:28:41 +09:00
Tomofumi Hayashi
6d3d800226 Update vendor packages, including CNI v1.2.0 2024-12-20 11:28:38 +09:00
Doug Smith
fba1fea81e
Merge pull request #1373 from dougbtv/livequery-context
adds context to GetPodAPILiveQuery
2024-12-19 14:48:14 -05:00
dougbtv
f186370654 adds context to GetPodAPILiveQuery 2024-12-19 14:41:32 -05:00
Doug Smith
fc72ddbd24
Merge pull request #1332 from dougbtv/getlivepod
always attempt a live pod get on miss to confirm its really not there
2024-12-19 14:13:10 -05:00
dougbtv
fb03b0f754 This makes sure that stale caches never result in NotFound errors.
It was explained to me that informers are almost always are more efficient, and in most cases will work, but a live lookup is appropriate after a number of failures.

This happens only on the retry portion, so we're still getting the benefits of informers, but, on a retry situation, we don't get a cache miss.

Additionally, changes out use of cache get on this, since it already bails out before it on CNI DEL.
2024-12-19 13:57:57 -05:00
Doug Smith
5338017bf6
Merge pull request #1372 from pmtk/dont-wait-too-long-for-apiserver
Thin plugin: don't wait too long for an answer from API Server
2024-12-19 10:55:40 -05:00
Patryk Matuszak
4ff141c18d Don't wait too long for an answer from API Server
If Multus plugin gets a DEL request, but the API Server is down (e.g.
via 'crictl rmp'), the call takes so long, it actually never finishes.
This prevents CRI-O from deleting the Pods.
2024-12-19 16:13:38 +01:00
Doug Smith
4fc16b3bb8
Merge pull request #1355 from Nordix/fix-cve-moshiur
Support go 1.22 and 1.23 build to fix CVE
2024-12-06 16:56:48 -05:00
smoshiur1237
ddbcd2c4ef
Support go 1.22 to fix CVE
Signed-off-by: smoshiur1237 <moshiur.rahman@est.tech>
2024-12-05 17:03:03 +02:00
Tomofumi Hayashi
781ecdaecd
Merge pull request #1353 from xrstf/master
clean up go.mod, get rid of client-go v1.5.2
2024-11-08 01:53:15 +09:00
Christoph Mewes
808185b10f clean up go.mod, get rid of client-go v1.5.2 2024-11-06 12:51:30 +01:00
Doug Smith
e1a0d2a3fd
Merge pull request #1345 from dougbtv/net-attach-def-lib-175
Update net-attach-def client library to 1.7.5 for cri-o functionality
2024-10-15 12:05:24 -04:00
dougbtv
ecf5854ca9 Update net-attach-def client library to 1.7.5 for cri-o functionality
From the release notes:

> This release contains a fix related to the determination of the default interface, e.g. setting the default parameter to true in the network-status annotation based on the presence of a gateway in the CNI ADD success result ips.gateway and makes the determination of the default based on the first interface that has an associated value of gateway (using the interface index in the ips element in the CNI ADD success result).

> This provides flexibility especially in CRI-O which uses the first interface and IP addresses for the pod.IP in Kubernetes, therefore. Containerd functionality is unchanged in that it uses the value for the IP addresses specifically

> It's worth noting that CNI ADD success results which do not contain any interfaces will be discarded in this determination of the default, therefore it's recommended to set one with an associated gateway if aiming to have it be noted as the default.

See also:
https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/releases/tag/v1.7.5
https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/pull/73
2024-10-15 11:37:32 -04:00
Doug Smith
adfb270991
Merge pull request #1341 from dougbtv/net-attach-def-client-v174
Updates net-attach-def client library to v1.7.4
2024-10-01 09:36:43 -04:00
dougbtv
b171bb702b Updates net-attach-def client library to v1.7.4
Which improves backwards compatibility for network-status in latest updates to the client library, especially related to Calico.

See also: https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/pull/72
2024-09-30 15:57:48 -04:00
Doug Smith
f1e887e239
Merge pull request #1336 from dougbtv/net-attach-def-client-v173
Bumps net-attach-def client to v1.7.3
2024-09-13 12:03:57 -04:00
dougbtv
100766d1a4 Bumps net-attach-def client to v1.7.3
Previous version didn't account for accounts for the sandox interfaces when reporting the interfaces in the network-status annotation when calculating the default:true interface
2024-09-13 09:56:52 -04:00
Doug Smith
e074c2a56b
Merge pull request #1335 from dougbtv/net-attach-def-client-v172
Bumps net-attach-def client library to v1.7.2
2024-09-12 13:35:46 -04:00
dougbtv
38d03eb816 Bumps net-attach-def client library to v1.7.2
This fixes the default:true for multiple interface returns from CNI for cluster default network, where all interfaces in that return were marked as default:true in the network-status
2024-09-12 11:25:26 -04:00
Doug Smith
b554c96160
Merge pull request #1334 from dougbtv/disable-dra-e2e-temporarily
Disabled DRA test temporarily
2024-09-12 10:55:16 -04:00
dougbtv
92ff1b1ee8 Disabled DRA test temporarily 2024-09-12 10:06:17 -04:00
Doug Smith
31e77aafab
Merge pull request #1321 from ah8ad3/update-install-readme
Doc: change install from file to url in readme, how-to-use
2024-08-29 09:41:23 -04:00
Ahmad Zolfaghari
dec0607a94 doc: change install from file to url in readme, how-to-use
Signed-off-by: Ahmad Zolfaghari <ah8ad3@gmail.com>
2024-08-09 16:32:07 +03:30
Doug Smith
3c33f6f028
Merge pull request #1314 from dougbtv/client-lib-multiple-if-cni-result
Updates to use CreateNetworkStauses from net-attach-def client, bump to v1.7.1
2024-08-05 07:59:36 -04:00
dougbtv
a28d1e4693 [bump] Bumps net-attach-def client lib to v1.7.1 2024-08-01 13:35:34 -04:00
Doug Smith
b9019016d7
Merge pull request #1317 from adrianchiris/pr-1302-update
create multus kubeconfig for in case of non auto flag.
2024-08-01 13:29:00 -04:00