Etienne Champetier
d924f05e12
build: update github.com/vishvananda/netlink to 1.3.0
...
This includes a breaking change:
acdc658b86
route.Dst is now a zero IPNet instead of nil
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2024-08-26 14:27:30 -04:00
Austin Vazquez
9c016b5d12
Rename unused variables to resolve lint warnings
...
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2024-03-11 17:52:02 +01:00
Casey Callendrello
abee8ccc0d
Merge pull request #954 from cyclinder/improve_cmd_del
...
macvlan cmdDel: replace the loadConf function with json.unmarshal
2023-11-16 19:06:11 +01:00
Zenghui Shi
999ca15763
macvlan: enable ipv6 ndisc_notify
...
Signed-off-by: Zenghui Shi <zshi@redhat.com>
2023-11-07 19:43:50 +08:00
cyclinder
845ef62b74
macvlan cmdDel: replace the loadConf function with json.unmarshal
...
When the master interface on the node has been deleted, and loadConf tries
to get the MTU, This causes cmdDel to return a linkNotFound error to the
runtime. The cmdDel only needs to unmarshal the netConf. No need to
get the MTU. So we just replaced the loadConf function with
json.unmarshal in cmdDel.
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2023-10-17 10:26:18 +08:00
Casey Callendrello
deec68747e
Merge pull request #853 from mmorel-35/ginkgolinter
...
enable ginkgolinter linter
2023-04-04 15:24:20 +02:00
Marcelo Guerrero Viveros
d71d0f2da1
Fix revive linter errors
...
Golangci-lint is now running version 1.52.1. This introduced some errors.
Signed-off-by: Marcelo Guerrero Viveros <marguerr@redhat.com>
2023-03-24 21:04:39 +01:00
Matthieu MOREL
09f36a295d
enable ginkgolinter linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-13 22:27:21 +00:00
Matthieu MOREL
79f524689c
enable gocritic linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-13 17:59:33 +01:00
Matthieu MOREL
177e0bf2d9
enable staticcheck linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-02 11:06:22 +01:00
Matthieu MOREL
d12b81dec5
ci(lint): setup golangci-lint
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-03-01 06:55:40 +00:00
Dan Williams
36e1e162fa
Merge pull request #812 from liornoy/ginkgov2
...
Update ginkgo to v2
2023-02-20 10:58:24 -06:00
Marcelo Guerrero Viveros
9ee4d3225d
Fix overwritten error var in getMTUByName
...
this prevents the error to be lost which was causing the
panic while accesing a nil var.
Fix #830
Signed-off-by: Marcelo Guerrero Viveros <marguerr@redhat.com>
2023-02-16 12:28:17 +01:00
liornoy
2d1005ec02
Update tests to utilize ginkgo/v2
...
This commit updates the import of ginkgo to v2 in
all of the tests.
Signed-off-by: liornoy <lnoy@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-13 21:15:18 +02:00
mmirecki
ac7cf82531
Add support for in-container master for macvlans
...
Signed-off-by: mmirecki <mmirecki@redhat.com>
2023-01-25 12:58:28 +01:00
Austin Vazquez
1a6f478913
Remove references to io/ioutil package
...
Signed-off-by: Austin Vazquez <macedonv@amazon.com>
2022-12-01 22:27:05 +00:00
Casey Callendrello
186edecd6c
Merge pull request #687 from MikeZappa87/issue/588/removegArp
...
Replace arping package with arp_notify
2022-01-19 18:14:55 +01:00
Michael Zappa
5d073d690c
plugins: replace arping package with arp_notify
...
this replaces the arping package with the linux arp_notify feature.
Resolves: #588
Signed-off-by: Michael Zappa <Michael.Zappa@stateless.net>
2022-01-06 20:53:54 -07:00
silenceper
67110e02ba
fix #685
...
Signed-off-by: silenceper <silenceper@gmail.com>
2022-01-06 20:57:52 +08:00
Kavya
5b02c2ab70
Fix broken links to online docs in plugin READMEs
...
Signed-off-by: Kavya <kavya.g@ibm.com>
2021-03-25 13:07:33 +05:30
Dan Williams
d385120175
Merge pull request #537 from dcbw/100
...
Port plugins to CNI 1.0.0 and increase old verison test coverage
2021-03-03 10:51:56 -06:00
Piotr Skamruk
e31cd2ce1a
[macvlan] Stop setting proxy-arp on macvlan interface
...
The original issue was: https://github.com/containernetworking/cni/issues/84
I've added "a fix" for it in
https://github.com/containernetworking/cni/pull/149 which then was
merged in https://github.com/containernetworking/cni/pull/177
The thing is that "the fix" was incorrect as it was setting 1 on
arp_proxy (I really don't recall why) instead of setting it on
arp_notify - which was my original suggestion in:
https://github.com/rkt/rkt/issues/1765#issuecomment-188776317
Setting apr_proxy can be harmfull and we have already support for
sending GratuitousArpOverIface after setting an IP address, so setting
any sysctl should not be needed.
Signed-off-by: Piotr Skamruk <piotr.skamruk@gmail.com>
2021-02-21 11:34:12 +01:00
Dan Williams
bbf7189c32
macvlan: increase test coverage to 1.0.0 and older spec versions
...
Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-02-11 23:27:08 -06:00
Dan Williams
7d8c767622
plugins: update to spec version 1.0.0
...
Signed-off-by: Dan Williams <dcbw@redhat.com>
2021-02-11 23:27:08 -06:00
Nate W
cccf5395e8
Updating plugin README.md files ( #549 )
...
Removing content and pointing at the new website as a part of the CNI Documentation migration.
Signed-off-by: Nate W <4453979+nate-double-u@users.noreply.github.com>
2020-11-18 17:38:45 +01:00
Ashish Billore
68a80bcf9b
Update README.md
...
Updated "Notes" for minor fixes.
2020-06-19 15:39:28 +09:00
Clint Armstrong
b9560fd5c1
macvlan: set mac address from CNI_ARGS
...
This change sets the mac address if specified during the creation of the
macvlan interface. This is superior to setting it via the tuning plugin
because this ensures the mac address is set before an IP is set,
allowing a container to get a reserved IP address from DHCP.
Related #450
Signed-off-by: Clint Armstrong <clint@clintarmstrong.net>
2020-05-20 13:58:38 -04:00
Bruce Ma
e1f955d9bf
macvlan: add MTU validation to loadNetConf
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-10-23 20:39:14 +08:00
smarkm
0d0dcfc02f
Cleanup netns after test suit
...
Signed-off-by: smarkm <smark@freecoop.net>
2019-08-22 08:10:35 +08:00
Michael Cambria
02ccf1ef9b
Have ipam.ExecDel set CNI_COMMAND to DEL
2019-05-08 11:50:28 -04:00
Casey Callendrello
a03e6b505e
Merge pull request #307 from SchSeba/l2-macvlan
...
Allow to configure empty ipam for macvlan
2019-05-08 17:27:52 +02:00
Sebastian Sch
af692de1b8
Allow to configure empty ipam for macvlan
...
This PR add the option to configure an empty ipam for the macvlan cni plugin.
When using the macvlan cni plugin with an empty ipam the requeted pod will get the macvlan interface but without any ip address.
One of the use cases for this feature is for projects that runs a dhcp server inside the pod like KubeVirt.
In KubeVirt we need to let the vm running inside the pod to make the dhcp request so it will be able to make a release an renew request when needed.
2019-05-01 20:29:22 +03:00
Casey Callendrello
dbc86e4db2
Merge pull request #298 from s1061123/dev/macvlan-default-master
...
macvlan: make master config as optional
2019-04-30 15:47:51 +02:00
Bruce Ma
214bcb8c8b
fix bug on ipam revert if cmdAdd fails on macvlan and host-device
2019-04-18 21:16:29 +08:00
Tomofumi Hayashi
7924ef76da
Incorporate with reviewer's comments
2019-04-18 00:54:31 +09:00
Tomofumi Hayashi
8c52f50849
macvlan: make master config as optional
...
To ease of config, make master config as optional parameter.
In default case, default route interface will be used for master.
2019-04-17 16:28:27 +09:00
Casey Callendrello
72f2a1ffd4
plugins: correctly output build version, cosmetic cleanups
...
Now that libcni has the ability to print a version message, plumb it
through correctly.
While we're at it,
- fix import paths
- run gofmt
- add some more comments to sample
- add container runtime swappability for release
2019-04-15 16:52:07 +02:00
Michael Cambria
74a2596573
Add check support for: bridge, ipvlan, macvlan, p2p, vlan and host-device main plugins
...
host-local and static ipam plugins
tuning, bandwidth and portmap meta plugins
Utility functions created for common PrevResult checking
Fix windows build
2019-04-03 13:08:07 -04:00
hwchiu
e3ec4a74d0
fix the typo, we use the passthru in the macvlan.go
2018-10-17 17:15:43 +00:00
Casey Callendrello
68b4efb405
plugins/* stub-out GET functions so plugins build with v0.7
2018-06-15 15:28:53 +02:00
Dan Williams
731298003c
plugins/testutils: pass CNI_CONTAINERID to plugins in testcases
...
Recent CNI specification changes require the container ID on ADD/DEL,
which the testcases were not providing. Fix that up so things work
when this repo gets CNI revendored.
2018-04-26 11:24:30 -05:00
Casey Callendrello
aade7b93ee
build: some small improvements; bump to go1.10
...
- bump to go 1.10
- Add a linker tag with the build version
- Remove fastbuild, go builds are cached now
- Use better ginkgo suite names
2018-04-12 16:59:51 +02:00
Casey Callendrello
a0eac8d7d9
pkg/ns: remove namespace creation (and move to testutils)
...
Namespace creation had an unergonomic interface and isn't used, except
for testing code. Remove it; downstream users should really be creating
their own namespaces
2018-04-03 18:56:25 +02:00
oilbeater
1f02326d56
delete link and ip if err when cmdAdd to avoid resource leak.
2017-11-27 15:26:07 +08:00
Casey Callendrello
7a62515407
pkg/ip: Fix ipmasq teardown on v6-only interfaces
2017-09-06 20:02:41 +02:00
Dan Williams
0da6780449
pkg,plugins: update for Result struct Interface index changes
...
It's a pointer now, so we need to use the helper function to set
the field and also test for nil before accessing it.
2017-06-29 13:40:36 -05:00
Casey Callendrello
e76165b44f
ptp, macvlan: don't change mac address; send gratuitous arp
2017-06-07 16:08:41 +02:00
Casey Callendrello
3c436520be
move most of cni/pkg to plugins/pkg: delete code staying in cni/pkg
...
This moves the following packages to this repository:
* ip
* ipam
* ns
* testutils
* utils
2017-05-23 16:12:49 +02:00
Casey Callendrello
9f52fc0374
Move documentation folder to individual READMEs
2017-05-16 16:46:15 +02:00
Dan Williams
9445711fa5
spec/plugins: fix 'ip'->'ips' in the spec, bump to 0.3.1
2017-04-05 12:46:24 -05:00