Skip to content

Commit 0ed7f5c

Browse files
authored
Merge pull request #552 from ykulazhenkov/nvidia-ipam-leader-elect
Update manifests to deploy nvidia-ipam in HA mode
2 parents b37b91d + ac70cc7 commit 0ed7f5c

File tree

7 files changed

+40
-7
lines changed

7 files changed

+40
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ spec:
217217
nvIpam:
218218
image: nvidia-k8s-ipam
219219
repository: ghcr.io/mellanox
220-
version: v0.0.2
220+
version: v0.0.3
221221
config: '{
222222
"pools": {
223223
"my-pool": {"subnet": "192.168.0.0/24", "perNodeBlockSize": 100, "gateway": "192.168.0.1"}

deployment/network-operator/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,11 @@ optionally deployed components:
555555
#### NVIDIA IPAM Plugin
556556

557557
| Name | Type | Default | description |
558-
| ------------------------- | ------ | ------------------ | -------------------------------------------------------------------------------------- |
558+
| ------------------------- | ------ |--------------------| -------------------------------------------------------------------------------------- |
559559
| `nvIpam.deploy` | bool | `false` | Deploy NVIDIA IPAM Plugin |
560560
| `nvIpam.image` | string | `nvidia-k8s-ipam` | NVIDIA IPAM Plugin image name |
561561
| `nvIpam.repository` | string | `ghcr.io/mellanox` | NVIDIA IPAM Plugin image repository |
562-
| `nvIpam.version` | string | `v0.0.2` | NVIDIA IPAM Plugin image version |
562+
| `nvIpam.version` | string | `v0.0.3` | NVIDIA IPAM Plugin image version |
563563
| `nvIpam.imagePullSecrets` | list | `[]` | An optional list of references to secrets to use for pulling any of the Plugin image |
564564
| `nvIpam.config` | string | `''` | Network pool configuration as described in https://github.com/Mellanox/nvidia-k8s-ipam |
565565

deployment/network-operator/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ nvIpam:
231231
deploy: false
232232
image: nvidia-k8s-ipam
233233
repository: ghcr.io/mellanox
234-
version: v0.0.2
234+
version: v0.0.3
235235
# imagePullSecrets: []
236236
# network pool configuration as described in https://github.com/Mellanox/nvidia-k8s-ipam
237237
config: ''

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-nvidia-ipam.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ spec:
6161
nvIpam:
6262
image: nvidia-k8s-ipam
6363
repository: ghcr.io/mellanox
64-
version: v0.0.2
64+
version: v0.0.3
6565
config: '{
6666
"pools": {
6767
"my-pool": {"subnet": "192.168.0.0/24", "perNodeBlockSize": 100, "gateway": "192.168.0.1"}

hack/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ IpamPlugin:
5252
nvIpam:
5353
image: nvidia-k8s-ipam
5454
repository: ghcr.io/mellanox
55-
version: v0.0.2
55+
version: v0.0.3

manifests/state-nv-ipam-cni/020-cluster-role.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,23 @@ rules:
4747
- get
4848
- list
4949
- watch
50+
- apiGroups:
51+
- coordination.k8s.io
52+
resources:
53+
- leases
54+
verbs:
55+
- get
56+
- list
57+
- watch
58+
- create
59+
- update
60+
- patch
61+
- delete
62+
- apiGroups:
63+
- ""
64+
resources:
65+
- events
66+
verbs:
67+
- create
68+
- patch
5069
---

manifests/state-nv-ipam-cni/040-nv-ipam-controller.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ metadata:
2727
spec:
2828
strategy:
2929
type: RollingUpdate
30-
replicas: 1
30+
replicas: 2
3131
selector:
3232
matchLabels:
3333
name: nv-ipam-controller
@@ -41,6 +41,18 @@ spec:
4141
priorityClassName: system-cluster-critical
4242
serviceAccountName: nv-ipam-controller
4343
affinity:
44+
podAntiAffinity:
45+
# use preferred(instead of required) here to support deployment to the singe node cluster
46+
preferredDuringSchedulingIgnoredDuringExecution:
47+
- weight: 100
48+
podAffinityTerm:
49+
labelSelector:
50+
matchExpressions:
51+
- key: name
52+
operator: In
53+
values:
54+
- nv-ipam-controller
55+
topologyKey: "kubernetes.io/hostname"
4456
nodeAffinity:
4557
preferredDuringSchedulingIgnoredDuringExecution:
4658
- weight: 1
@@ -81,6 +93,8 @@ spec:
8193
args:
8294
- --config-name=nvidia-k8s-ipam-config
8395
- --config-namespace=$(POD_NAMESPACE)
96+
- --leader-elect=true
97+
- --leader-elect-namespace=$(POD_NAMESPACE)
8498
env:
8599
- name: POD_NAMESPACE
86100
valueFrom:

0 commit comments

Comments
 (0)