Skip to content

Commit 9448aba

Browse files
authored
doc: add full NCP example for OCP (#1350)
2 parents 9ff1b7a + 970a1f7 commit 9448aba

File tree

2 files changed

+210
-0
lines changed

2 files changed

+210
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# 2024 NVIDIA CORPORATION & AFFILIATES
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# ##### Note #####
16+
# This example contains all the components supported as a reference.
17+
# User should edit the example and keep only the required components.
18+
#
19+
apiVersion: mellanox.com/v1alpha1
20+
kind: NicClusterPolicy
21+
metadata:
22+
name: nic-cluster-policy
23+
spec:
24+
ofedDriver:
25+
image: doca-driver
26+
repository: nvcr.io/nvstaging/mellanox
27+
version: 25.01-0.6.0.0-0
28+
upgradePolicy:
29+
autoUpgrade: true
30+
drain:
31+
deleteEmptyDir: true
32+
enable: true
33+
force: true
34+
timeoutSeconds: 300
35+
maxParallelUpgrades: 1
36+
startupProbe:
37+
initialDelaySeconds: 10
38+
periodSeconds: 10
39+
livenessProbe:
40+
initialDelaySeconds: 30
41+
periodSeconds: 30
42+
readinessProbe:
43+
initialDelaySeconds: 10
44+
periodSeconds: 30
45+
rdmaSharedDevicePlugin:
46+
image: k8s-rdma-shared-dev-plugin
47+
repository: ghcr.io/mellanox
48+
version: v1.5.2
49+
# The config below directly propagates to k8s-rdma-shared-device-plugin configuration.
50+
# Replace 'devices' with your (RDMA capable) netdevice name.
51+
config: |
52+
{
53+
"configList": [
54+
{
55+
"resourceName": "rdma_shared_device_a",
56+
"rdmaHcaMax": 63,
57+
"selectors": {
58+
"vendors": ["15b3"],
59+
"deviceIDs": ["101b"]
60+
}
61+
}
62+
]
63+
}
64+
sriovDevicePlugin:
65+
image: sriov-network-device-plugin
66+
repository: ghcr.io/k8snetworkplumbingwg
67+
version: v3.9.0
68+
config: |
69+
{
70+
"resourceList": [
71+
{
72+
"resourcePrefix": "nvidia.com",
73+
"resourceName": "hostdev",
74+
"selectors": {
75+
"vendors": ["15b3"],
76+
"isRdma": true
77+
}
78+
}
79+
]
80+
}
81+
secondaryNetwork:
82+
ipoib:
83+
image: ipoib-cni
84+
repository: ghcr.io/mellanox
85+
version: v1.2.1
86+
ipamPlugin:
87+
image: whereabouts
88+
repository: ghcr.io/k8snetworkplumbingwg
89+
version: v0.7.0
90+
nvIpam:
91+
image: nvidia-k8s-ipam
92+
repository: ghcr.io/mellanox
93+
version: v0.2.0
94+
enableWebhook: false
95+
ibKubernetes:
96+
image: ib-kubernetes
97+
repository: ghcr.io/mellanox
98+
version: v1.1.0
99+
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
100+
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
101+
ufmSecret: ufm-secret
102+
nicFeatureDiscovery:
103+
image: nic-feature-discovery
104+
repository: ghcr.io/mellanox
105+
version: v0.0.1
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# 2024 NVIDIA CORPORATION & AFFILIATES
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
# ##### Note #####
16+
# This example contains all the components supported as a reference.
17+
# User should edit the example and keep only the required components.
18+
#
19+
apiVersion: mellanox.com/v1alpha1
20+
kind: NicClusterPolicy
21+
metadata:
22+
name: nic-cluster-policy
23+
spec:
24+
ofedDriver:
25+
image: {{ .Mofed.Image }}
26+
repository: {{ .Mofed.Repository }}
27+
version: {{ .Mofed.Version }}
28+
upgradePolicy:
29+
autoUpgrade: true
30+
drain:
31+
deleteEmptyDir: true
32+
enable: true
33+
force: true
34+
timeoutSeconds: 300
35+
maxParallelUpgrades: 1
36+
startupProbe:
37+
initialDelaySeconds: 10
38+
periodSeconds: 10
39+
livenessProbe:
40+
initialDelaySeconds: 30
41+
periodSeconds: 30
42+
readinessProbe:
43+
initialDelaySeconds: 10
44+
periodSeconds: 30
45+
rdmaSharedDevicePlugin:
46+
image: {{ .RdmaSharedDevicePlugin.Image }}
47+
repository: {{ .RdmaSharedDevicePlugin.Repository }}
48+
version: {{ .RdmaSharedDevicePlugin.Version }}
49+
# The config below directly propagates to k8s-rdma-shared-device-plugin configuration.
50+
# Replace 'devices' with your (RDMA capable) netdevice name.
51+
config: |
52+
{
53+
"configList": [
54+
{
55+
"resourceName": "rdma_shared_device_a",
56+
"rdmaHcaMax": 63,
57+
"selectors": {
58+
"vendors": ["15b3"],
59+
"deviceIDs": ["101b"]
60+
}
61+
}
62+
]
63+
}
64+
sriovDevicePlugin:
65+
image: {{ .SriovDevicePlugin.Image }}
66+
repository: {{ .SriovDevicePlugin.Repository }}
67+
version: {{ .SriovDevicePlugin.Version }}
68+
config: |
69+
{
70+
"resourceList": [
71+
{
72+
"resourcePrefix": "nvidia.com",
73+
"resourceName": "hostdev",
74+
"selectors": {
75+
"vendors": ["15b3"],
76+
"isRdma": true
77+
}
78+
}
79+
]
80+
}
81+
secondaryNetwork:
82+
ipoib:
83+
image: {{ .Ipoib.Image }}
84+
repository: {{ .Ipoib.Repository }}
85+
version: {{ .Ipoib.Version }}
86+
ipamPlugin:
87+
image: {{ .IpamPlugin.Image }}
88+
repository: {{ .IpamPlugin.Repository }}
89+
version: {{ .IpamPlugin.Version }}
90+
nvIpam:
91+
image: {{ .NvIPAM.Image }}
92+
repository: {{ .NvIPAM.Repository }}
93+
version: {{ .NvIPAM.Version }}
94+
enableWebhook: false
95+
ibKubernetes:
96+
image: {{ .IbKubernetes.Image }}
97+
repository: {{ .IbKubernetes.Repository }}
98+
version: {{ .IbKubernetes.Version }}
99+
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
100+
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
101+
ufmSecret: ufm-secret
102+
nicFeatureDiscovery:
103+
image: {{ .NicFeatureDiscovery.Image }}
104+
repository: {{ .NicFeatureDiscovery.Repository }}
105+
version: {{ .NicFeatureDiscovery.Version }}

0 commit comments

Comments
 (0)