Network plugin custom (#9819)

* network_plugin/custom_cni: add CNI to apply provided manifests

Add a new simple custom_cni to install provided Kubernetes manifests.
This could be useful to use manifests directly provided by a CNI when
there are not support by Kubespray (i.e.: helm chart or any other manifests
generation method).

Co-authored-by: James Landrein <james.landrein@proton.ch>
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

* network_plugin/custom_cni: add test with cilium

Co-authored-by: James Landrein <james.landrein@proton.ch>
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>

---------

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
Co-authored-by: James Landrein <james.landrein@proton.ch>
This commit is contained in:
Arthur Outhenin-Chalandre
2023-03-03 09:23:08 +01:00
committed by GitHub
parent 677b7ecd89
commit 6769bb32b1
12 changed files with 1184 additions and 52 deletions

View File

@@ -0,0 +1,11 @@
# Custom CNI manifest generation
As an example we are using Cilium for testing the network_plugins/custom_cni.
To update the generated manifests to the latest version do the following:
```sh
helm repo add cilium https://helm.cilium.io/
helm repo update
helm template cilium/cilium -n kube-system -f values.yaml > cilium.yaml
```

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
---
# We disable hubble so that helm doesn't try to generate any certificate.
# This is not needed to test network_plugin/custom_cni anyway.
hubble:
enabled: false
ipam:
operator:
# Set the appropriate pods subnet
clusterPoolIPv4PodCIDR: "{{ kube_pods_subnet }}"

View File

@@ -0,0 +1,9 @@
---
# Instance settings
cloud_image: debian-11
mode: default
# Kubespray settings
kube_network_plugin: custom_cni
custom_cni_manifests:
- tests/files/custom_cni/cilium.yaml