From af53e149e1867cc9461d1ae4b7108a193b3b7515 Mon Sep 17 00:00:00 2001 From: Yury Kulazhenkov Date: Wed, 20 Dec 2023 13:05:16 +0200 Subject: [PATCH] Add IPv6 pool example to README.md Add IPv6 examples to README.md and fix pool name in existing examples Signed-off-by: Yury Kulazhenkov --- README.md | 29 +++++++++++++++++++++++++---- examples/ippool-2.yaml | 6 +++--- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b2fcbf9..5e9a12c 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ _Example macvlan CNI configuration_: "mode": "bridge", "ipam": { "type": "nv-ipam", - "poolName": "my-pool" + "poolName": "pool1" } } ``` @@ -201,11 +201,13 @@ Controller flags: ipam-controller accepts IP Pools configuration via IPPool CRs. Multiple IPPool CRs can be created, with different NodeSelectors. +##### IPv4 example + ```yaml apiVersion: nv-ipam.nvidia.com/v1alpha1 kind: IPPool metadata: - name: my-pool + name: pool1 namespace: kube-system spec: subnet: 192.168.0.0/16 @@ -218,6 +220,25 @@ spec: operator: Exists ``` +##### IPv6 example + +```yaml +apiVersion: nv-ipam.nvidia.com/v1alpha1 +kind: IPPool +metadata: + name: pool2 + namespace: kube-system +spec: + subnet: fd52:2eb5:44::/48 + perNodeBlockSize: 500 + gateway: fd52:2eb5:44::1 + nodeSelector: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io/worker + operator: Exists +``` + * `spec`: contains the IP pool configuration * `subnet`: IP Subnet of the pool * `gateway`: Gateway IP of the subnet @@ -313,7 +334,7 @@ nv-ipam accepts the following CNI configuration: ```json { "type": "nv-ipam", - "poolName": "my-pool", + "poolName": "pool1,pool2", "daemonSocket": "unix:///var/lib/cni/nv-ipam/daemon.sock", "daemonCallTimeoutSeconds": 5, "confDir": "/etc/cni/net.d/nv-ipam.d", @@ -368,7 +389,7 @@ cat <