Ashley Reese
cf187287af
Update tests for uint64
...
Signed-off-by: Ashley Reese <ashley@victorianfox.com>
2019-10-03 16:55:41 +02:00
Ashley Reese
0dff883769
Use uint64 for Bandwidth plugin
...
Signed-off-by: Ashley Reese <ashley@victorianfox.com>
2019-10-03 16:05:27 +02:00
Dan Williams
d0eeb27494
Merge pull request #390 from sipsma/firewall-fix
...
firewall: don't return error in DEL if prevResult is not found.
2019-10-02 10:38:47 -05:00
Bruce Ma
e70558cbe1
bridge: check vlan id when loading net conf
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-09-30 17:12:31 +08:00
Erik Sipsma
0a1421a08c
firewall: remove unused netns check from DEL method
...
Signed-off-by: Erik Sipsma <sipsma@amazon.com>
2019-09-25 20:38:02 +00:00
Casey Callendrello
0f19aa2f8d
Merge pull request #388 from sipsma/fix-ptpdns
...
ptp: only override DNS conf if DNS settings provided
2019-09-25 17:43:24 +02:00
Guangming Wang
8ec6bd6a42
bugfix: defer after err check, or it may panic
...
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-09-25 22:21:49 +08:00
Erik Sipsma
fc7059c1ae
firewall: don't return error in DEL if prevResult is not found.
...
The CNI spec states that for DEL implementations, "when CNI_NETNS and/or
prevResult are not provided, the plugin should clean up as many resources as
possible (e.g. releasing IPAM allocations) and return a successful response".
This change results in the firewall plugin conforming to the spec by not
returning an error whenever the del method is not provided a prevResult.
Signed-off-by: Erik Sipsma <sipsma@amazon.com>
2019-09-23 21:11:07 +00:00
Erik Sipsma
a96c469e62
ptp: only override DNS conf if DNS settings provided
...
Previously, if an IPAM plugin provided DNS settings in the result to the PTP
plugin, those settings were always lost because the PTP plugin would always
provide its own DNS settings in the result even if the PTP plugin was not
configured with any DNS settings.
This was especially problematic when trying to use, for example, the host-local
IPAM plugin's support for retrieving DNS settings from a resolv.conf file on
the host. Before this change, those DNS settings were always lost when using the
PTP plugin and couldn't be specified as part of PTP instead because PTP does not
support parsing a resolv.conf file.
This change checks to see if any fields were actually set in the PTP plugin's
DNS settings and only overrides any previous DNS results from an IPAM plugin in
the case that settings actually were provided to PTP. In the case where no
DNS settings are provided to PTP, the DNS results of the IPAM plugin (if any)
are used instead.
Signed-off-by: Erik Sipsma <sipsma@amazon.com>
2019-09-18 21:09:22 +00:00
Michael Cambria
fd42109a06
When prevResults are not returned to loopback plugin, create results to return based on
...
the lo interface and IP address assigned inside container.
Signed-off-by: Michael Cambria <mcambria@redhat.com>
2019-09-11 11:57:03 -04:00
Niels van Oosterom
e8365e126d
Fixed issue where hostIP address family was not checked against the containerIP address family. closes #378
...
Signed-off-by: Niels van Oosterom <xcelsion@users.noreply.github.com>
2019-09-06 15:23:00 +02:00
Casey Callendrello
f81a529ebd
Merge pull request #375 from smarkm/master
...
Fixes #342 , cleanup netns after test suite
2019-08-28 17:55:36 +02:00
Bruce Ma
3d56f7504d
loopback plugin support to pass previous result transpartently
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-08-23 22:56:22 +08:00
Bruce Ma
659a09f34e
loopback support CNI CHECK
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-08-23 20:36:37 +08:00
smarkm
0d0dcfc02f
Cleanup netns after test suit
...
Signed-off-by: smarkm <smark@freecoop.net>
2019-08-22 08:10:35 +08:00
Casey Callendrello
ca82120019
win-bridge, win-overlay: remove extra import
2019-08-14 18:15:23 +02:00
Casey Callendrello
c9e1c0c1ed
Merge pull request #281 from s1061123/dev/support-args
...
Support "args" in static and tuning
2019-08-14 17:43:04 +02:00
Lantao Liu
ad7c1d189b
Fix a race condition in the bridge plugin.
...
Signed-off-by: Lantao Liu <lantaol@google.com>
2019-08-09 17:08:04 -07:00
Tomofumi Hayashi
a069a5f1a3
Support "args" in static and tuning
...
Support "args" field in JSON config to additional configuration
in static and tuning plugins.
2019-08-09 11:52:06 +09:00
Gabe Rosenhouse
ccd683e1a3
Merge pull request #357 from mars1024/bugfix/host-device
...
host-device: revert name setting to make retries idempotent
2019-08-07 08:54:26 -07:00
Casey Callendrello
a11cb626b0
Merge pull request #331 from nagiesek/LoopbackDsr
...
Loopback dsr & L2Tunnel
2019-08-07 17:48:00 +02:00
Tomofumi Hayashi
8902d2614a
Remove link Down/Up in MAC address change to prevent route flush
2019-08-07 13:54:10 +09:00
Nathan Gieseker
df9af9ab41
[Windows] Adds optional loopbackDSR argument to cni config.
...
Adds a bool to the cni config that will add a policy that allows for loopbackDSR on an interface. Updates relevant documentation. Allows L2Tunnel networks to be used for L2Bridge plugin.
2019-07-31 15:45:54 -07:00
Bruce Ma
5e2e365291
host-device: remove useless Expects in testcases
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-29 21:09:03 +08:00
Bruce Ma
4b68f56820
host-device: add testcases for imdempotence of CmdDel
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-29 20:47:28 +08:00
Casey Callendrello
ded2f17577
Merge pull request #328 from mars1024/feature/hostlocal_idempotent
...
host-local support idempotent allocation
2019-07-24 17:32:15 +02:00
Bruce Ma
57650a1e5b
host-device: revert name setting to make retries idempotent
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-19 21:26:07 +08:00
Gabe Rosenhouse
3fb8dcfd4c
pkg/meta/bandwidth: increase IfbDeviceName size
...
* Increase entroy from 2 bytes to 7 bytes to prevent collisions
* Extract common library function for hash with prefix
* Refactor portmap plugin to use library function
fixes #347
Co-authored-by: Cameron Moreau <cmoreau@pivotal.io>
Co-authored-by: Mikael Manukyan <mmanukyan@pivotal.io>
2019-07-18 11:45:38 -07:00
Bruce Ma
e2984e7840
host-local: return error if duplicate allocation is requested for a given ID
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 10:05:18 +08:00
Bruce Ma
eb1ff18c4c
host-local: add some testcases for allocation idempotency
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 09:39:56 +08:00
Bruce Ma
e8771b36a2
host-local: make allocation idempotent to multiple requests with same id
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 09:39:56 +08:00
Bruce Ma
7f8ea631e5
host-local: make Store interface support to get ip list by id
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-07-06 09:39:56 +08:00
Tomofumi Hayashi
660685a8af
Support ips capability in static and mac capability in tuning
...
This change introduces new capability flag to change MAC address
and to specify IP addresses by tuning and static.
2019-06-20 17:11:47 +09:00
Bruce Ma
869d5ec873
pkg/ipam : use delegateArgs instead of env set/unset in ipam.ExecDel
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-06-18 21:02:01 +08:00
Dan Williams
e308211d34
Merge pull request #300 from zshi-redhat/host-device-pci-parameter
...
host-device: add pciBusID property
2019-05-29 11:06:00 -05:00
Casey Callendrello
7d75ab66a4
Merge pull request #321 from mars1024/modify/bandwidth
...
bandwidth: get bandwidth interface in host ns through container interface
2019-05-29 17:57:36 +02:00
Nick Ethier
37d2ee1d5d
bridge: don't use canonical CIDR address when setting up IP masquerade
2019-05-25 20:55:47 -04:00
Nick Ethier
7f9b1844b8
bridge: add test for ipMasq rules
2019-05-24 23:14:31 -04:00
Bruce Ma
d35c96dda6
bandwidth: add testcases for func getHostInterface
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-05-21 00:28:04 +08:00
Bruce Ma
344d343431
bandwidth: get bandwidth interface in host ns through container interface
...
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2019-05-18 14:06:45 +08:00
Casey Callendrello
0950a3607b
Merge pull request #279 from mars1024/bugfix/ipmasq_source
...
change source of ipmasq rule from ipn to ip
2019-05-10 13:40:17 +02: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
Dan Williams
6bceb68143
Merge pull request #309 from nagiesek/flannel
...
Flannel: Pass through runtimeConfig to delegate
2019-05-08 10:25:50 -05:00
Nathan Gieseker
071907f867
Flannel: pass runtimeConfig into delegate
2019-05-01 15:58:24 -07: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
Dan Williams
ae0b03787f
windows,flannel: cmdGet -> cmdCheck and fix flannel Check return
2019-05-01 10:48:14 -05: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
7efec9ea46
change source of ipmasq rule from ipn to ip
2019-04-25 15:59:02 +08:00
Zenghui Shi
79b1c402c4
host-device: add deviceID property
...
Fixes #253
2019-04-25 12:17:40 +08:00