Skip to content

Commit

Permalink
chore: Use NVIDIA IPAM Plugin by default (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianchiris authored Jun 17, 2024
2 parents b14d5a2 + efdbc19 commit 2973e58
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 47 deletions.
4 changes: 2 additions & 2 deletions deployment/network-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ ibKubernetes:
ufmSecret: '' # specify the secret name here

nvIpam:
deploy: false
deploy: true
image: nvidia-k8s-ipam
repository: ghcr.io/mellanox
version: v0.2.0
Expand Down Expand Up @@ -390,7 +390,7 @@ secondaryNetwork:
# cpu: "100m"
# memory: "50Mi"
ipamPlugin:
deploy: true
deploy: false
image: whereabouts
repository: ghcr.io/k8snetworkplumbingwg
version: v0.6.2
Expand Down
14 changes: 2 additions & 12 deletions example/crs/mellanox.com_v1alpha1_hostdevicenetwork_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ spec:
resourceName: "hostdev"
ipam: |
{
"type": "whereabouts",
"datastore": "kubernetes",
"kubernetes": {
"kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
},
"range": "192.168.3.225/28",
"exclude": [
"192.168.3.229/30",
"192.168.3.236/32"
],
"log_file" : "/var/log/whereabouts.log",
"log_level" : "info"
"type": "nv-ipam",
"poolName": "my-pool"
}
15 changes: 2 additions & 13 deletions example/crs/mellanox.com_v1alpha1_ipoibnetwork_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ spec:
master: "ibs3f1"
ipam: |
{
"type": "whereabouts",
"datastore": "kubernetes",
"kubernetes": {
"kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
},
"range": "192.168.5.225/28",
"exclude": [
"192.168.6.229/30",
"192.168.6.236/32"
],
"log_file" : "/var/log/whereabouts.log",
"log_level" : "info",
"gateway": "192.168.6.1"
"type": "nv-ipam",
"poolName": "my-pool"
}
15 changes: 2 additions & 13 deletions example/crs/mellanox.com_v1alpha1_macvlannetwork_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ spec:
mtu: 1500
ipam: |
{
"type": "whereabouts",
"datastore": "kubernetes",
"kubernetes": {
"kubeconfig": "/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig"
},
"range": "192.168.2.225/28",
"exclude": [
"192.168.2.229/30",
"192.168.2.236/32"
],
"log_file" : "/var/log/whereabouts.log",
"log_level" : "info",
"gateway": "192.168.2.1"
"type": "nv-ipam",
"poolName": "my-pool"
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
apiVersion: mellanox.com/v1alpha1
kind: MacvlanNetwork
metadata:
name: rdma-net
name: example-macvlannetwork
spec:
networkNamespace: "default"
master: "ens2f0"
Expand Down
23 changes: 23 additions & 0 deletions example/crs/nvidia.com_v1alpha1_nv_ipam_ippool_cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 2024 NVIDIA CORPORATION & AFFILIATES
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: nv-ipam.nvidia.com/v1alpha1
kind: IPPool
metadata:
name: my-pool
namespace: nvidia-network-operator
spec:
subnet: 192.168.0.0/24
perNodeBlockSize: 100
gateway: 192.168.0.1
2 changes: 1 addition & 1 deletion example/rdma-gpu-test-pod1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
k8s.v1.cni.cncf.io/networks: rdma-net-ipam
# If a network with static IPAM is used replace network annotation with the below.
# k8s.v1.cni.cncf.io/networks: '[
# { "name": "rdma-net",
# { "name": "example-macvlannetwork",
# "ips": ["192.168.111.101/24"],
# "gateway": ["192.168.111.1"]
# }
Expand Down
2 changes: 1 addition & 1 deletion example/rdma-gpu-test-pod2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
k8s.v1.cni.cncf.io/networks: rdma-net-ipam
# If a network with static IPAM is used replace network annotation with the below.
#k8s.v1.cni.cncf.io/networks: '[
# { "name": "rdma-net",
# { "name": "example-macvlannetwork",
# "ips": ["192.168.111.102/24"],
# "gateway": ["192.168.111.1"]
# }
Expand Down
2 changes: 1 addition & 1 deletion example/rdma-test-pod1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
k8s.v1.cni.cncf.io/networks: rdma-net-ipam
# If a network with static IPAM is used replace network annotation with the below.
#k8s.v1.cni.cncf.io/networks: '[
# { "name": "rdma-net",
# { "name": "example-macvlannetwork",
# "ips": ["192.168.111.101/24"],
# "gateway": ["192.168.111.1"]
# }
Expand Down
2 changes: 1 addition & 1 deletion example/rdma-test-pod2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
k8s.v1.cni.cncf.io/networks: rdma-net-ipam
# If a network with static IPAM is used replace network annotation with the below.
#k8s.v1.cni.cncf.io/networks: '[
# { "name": "rdma-net",
# { "name": "example-macvlannetwork",
# "ips": ["192.168.111.102/24"],
# "gateway": ["192.168.111.1"]
# }
Expand Down
4 changes: 2 additions & 2 deletions hack/templates/values/values.template
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ ibKubernetes:
ufmSecret: '' # specify the secret name here

nvIpam:
deploy: false
deploy: true
image: {{ .NvIPAM.Image }}
repository: {{ .NvIPAM.Repository }}
version: {{ .NvIPAM.Version }}
Expand Down Expand Up @@ -390,7 +390,7 @@ secondaryNetwork:
# cpu: "100m"
# memory: "50Mi"
ipamPlugin:
deploy: true
deploy: false
image: {{ .IpamPlugin.Image }}
repository: {{ .IpamPlugin.Repository }}
version: {{ .IpamPlugin.Version }}
Expand Down

0 comments on commit 2973e58

Please sign in to comment.