Skip to content

Commit

Permalink
Merge pull request #35 from ykulazhenkov/add-ipv6-examples
Browse files Browse the repository at this point in the history
Add IPv6 pool example to README.md
  • Loading branch information
ykulazhenkov committed Dec 20, 2023
2 parents 19e3258 + af53e14 commit 431e241
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ _Example macvlan CNI configuration_:
"mode": "bridge",
"ipam": {
"type": "nv-ipam",
"poolName": "my-pool"
"poolName": "pool1"
}
}
```
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -368,7 +389,7 @@ cat <<EOF | kubectl apply -f -
apiVersion: nv-ipam.nvidia.com/v1alpha1
kind: IPPool
metadata:
name: my-pool
name: pool1
namespace: kube-system
spec:
subnet: 192.168.0.0/16
Expand Down
6 changes: 3 additions & 3 deletions examples/ippool-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ metadata:
name: pool2
namespace: kube-system
spec:
subnet: 172.16.0.0/16
perNodeBlockSize: 128
gateway: 172.16.0.1
subnet: fd52:2eb5:44::/48
perNodeBlockSize: 500
gateway: fd52:2eb5:44::1
nodeSelector:
nodeSelectorTerms:
- matchExpressions:
Expand Down

0 comments on commit 431e241

Please sign in to comment.