Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IPv6 pool example to README.md #35

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading