multus-cni/e2e
Miguel Duarte Barroso 8ba2accb9f
Replace entrypoint script with initcontainers (#718)
* build: install the multus binary in an init container

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

* build: generate kubeconfig via go

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

* build: generate multus cni configuration via golang

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

* build: provide a docker img for daemon based deployments

We will have 2 different images (only on amd64 archs):
- legacy entrypoint script based
- daemonized process

The `image-build` docker action is updated, to build these 2 images.

There will be 2 different deployment specs, along with e2e test
lanes, one for each of the aforementioned alternatives.

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

* build: delegate CNI config watch loop via golang

For the thick-plugin alternative, provide the watch loop for
configuration regeneration via a golang binary.

Over time, this binary is expected to run the control loop to watch
out for pod updates.

To enable current multus users to chose when they upgrade to this new
deployment setup, these changes are provided in separate multus images,
having a different yaml spec files. Both of these alternatives are
tested e2e, since a new lane is introduced.

The following libraries are introduced, along with the motivation for
adding them:
- dproxy: allows traversing the default network configuration arbitrarily,
  similar to what an X path / JSON path tool provides.
  Repo is available at [0].
- fsnotify: watch for changes in the default CNI configuration file.
  Repo is available at [1].

The config map providing the default network CNI configuration is not
copied over, since originally, the user was not required to install a
default network CNI plugin first, but, nowadays, this is a required
step of multus.

As such, it is no longer required to provide a default CNI
configuration.

[0] - https://github.com/koron/go-dproxy
[1] - https://github.com/fsnotify/fsnotify

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

* run gofmt

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

* refactor: make the builder pattern more idiomatic to golang

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

* build: update github actions to release new imgs

Signed-off-by: Miguel Duarte Barroso <mdbarroso@redhat.com>
2021-10-27 08:42:37 -04:00
..
cni-install.yml Add e2e test with kind in CI pipeline 2020-02-13 17:02:22 +09:00
default-route1.yml Add e2e tests for default-route annotation 2020-09-14 12:56:12 +09:00
get_tools.sh Update e2e 2020-09-04 02:20:35 +09:00
legacy-multus-daemonset.yml Replace entrypoint script with initcontainers (#718) 2021-10-27 08:42:37 -04:00
multus-daemonset.yml Replace entrypoint script with initcontainers (#718) 2021-10-27 08:42:37 -04:00
README.md Update organization name due to ownership change 2021-03-16 16:24:49 +09:00
setup_cluster.sh e2e tests: allow podman OCI 2021-10-20 20:58:32 +09:00
simple-macvlan1.yml Add e2e tests for default-route annotation 2020-09-14 12:56:12 +09:00
simple-pod.yml Change nil instead of error in case of no network annotation 2021-03-31 23:06:55 +09:00
teardown.sh Update e2e 2020-09-04 02:20:35 +09:00
test-default-route1.sh Add e2e tests for default-route annotation 2020-09-14 12:56:12 +09:00
test-simple-macvlan1.sh Add e2e tests for default-route annotation 2020-09-14 12:56:12 +09:00
test-simple-pod.sh Change nil instead of error in case of no network annotation 2021-03-31 23:06:55 +09:00

Multus e2e test with kind

How to test e2e

$ git clone https://github.com/k8snetworkplumbingwg/multus-cni.git
$ cd multus-cni/e2e
$ ./get_tools.sh
$ ./setup_cluster.sh
$ ./test-simple-macvlan1.sh

How to teardown cluster

$ ./teardown.sh