Skip to content

Commit

Permalink
chore: add full NCP CR example
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Rolland <[email protected]>
  • Loading branch information
rollandf committed Jul 22, 2024
1 parent 6800708 commit fb62abf
Show file tree
Hide file tree
Showing 4 changed files with 320 additions and 0 deletions.
42 changes: 42 additions & 0 deletions config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,45 @@ spec:
}
]
}
sriovDevicePlugin:
image: sriov-network-device-plugin
repository: ghcr.io/k8snetworkplumbingwg
version: v3.7.0
config: |
{
"resourceList": [
{
"resourcePrefix": "nvidia.com",
"resourceName": "hostdev",
"selectors": {
"vendors": ["15b3"],
"isRdma": true
}
}
]
}
nvIpam:
image: nvidia-k8s-ipam
repository: ghcr.io/mellanox
version: v0.2.0
enableWebhook: false
ibKubernetes:
image: ib-kubernetes
repository: ghcr.io/mellanox
version: v1.0.2
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
ufmSecret: ufm-secret
nicFeatureDiscovery:
image: nic-feature-discovery
repository: ghcr.io/mellanox
version: v0.0.1
docaTelemetryService:
image: doca_telemetry
repository: nvcr.io/nvidia/doca
version: 1.16.5-doca2.6.0-host
secondaryNetwork:
ipoib:
image: ipoib-cni
repository: ghcr.io/mellanox
version: v1.2.0
118 changes: 118 additions & 0 deletions example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 2020 NVIDIA
#
# 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.
#
# ##### Note #####
# This example contains all the components supported as a reference.
# User should edit the example and keep only the required components.
#
apiVersion: mellanox.com/v1alpha1
kind: NicClusterPolicy
metadata:
name: nic-cluster-policy
spec:
ofedDriver:
image: doca-driver
repository: nvcr.io/nvstaging/mellanox
version: 24.07-0.3.2.0-0
upgradePolicy:
autoUpgrade: true
drain:
deleteEmptyDir: true
enable: true
force: true
timeoutSeconds: 300
maxParallelUpgrades: 1
startupProbe:
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 30
readinessProbe:
initialDelaySeconds: 10
periodSeconds: 30
rdmaSharedDevicePlugin:
image: k8s-rdma-shared-dev-plugin
repository: ghcr.io/mellanox
version: v1.5.1
# The config below directly propagates to k8s-rdma-shared-device-plugin configuration.
# Replace 'devices' with your (RDMA capable) netdevice name.
config: |
{
"configList": [
{
"resourceName": "rdma_shared_device_a",
"rdmaHcaMax": 63,
"selectors": {
"vendors": ["15b3"],
"deviceIDs": ["101b"]
}
}
]
}
sriovDevicePlugin:
image: sriov-network-device-plugin
repository: ghcr.io/k8snetworkplumbingwg
version: v3.7.0
config: |
{
"resourceList": [
{
"resourcePrefix": "nvidia.com",
"resourceName": "hostdev",
"selectors": {
"vendors": ["15b3"],
"isRdma": true
}
}
]
}
secondaryNetwork:
cniPlugins:
image: plugins
repository: ghcr.io/k8snetworkplumbingwg
version: v1.5.0
ipoib:
image: ipoib-cni
repository: ghcr.io/mellanox
version: v1.2.0
multus:
image: multus-cni
repository: ghcr.io/k8snetworkplumbingwg
version: v3.9.3
config: ''
ipamPlugin:
image: whereabouts
repository: ghcr.io/k8snetworkplumbingwg
version: v0.7.0
nvIpam:
image: nvidia-k8s-ipam
repository: ghcr.io/mellanox
version: v0.2.0
enableWebhook: false
ibKubernetes:
image: ib-kubernetes
repository: ghcr.io/mellanox
version: v1.0.2
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
ufmSecret: ufm-secret
nicFeatureDiscovery:
image: nic-feature-discovery
repository: ghcr.io/mellanox
version: v0.0.1
docaTelemetryService:
image: doca_telemetry
repository: nvcr.io/nvidia/doca
version: 1.16.5-doca2.6.0-host
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright 2020 NVIDIA
#
# 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.
#
# ##### Note #####
# This example contains all the components supported as a reference.
# User should edit the example and keep only the required components.
#
apiVersion: mellanox.com/v1alpha1
kind: NicClusterPolicy
metadata:
name: nic-cluster-policy
spec:
ofedDriver:
image: {{ .Mofed.Image }}
repository: {{ .Mofed.Repository }}
version: {{ .Mofed.Version }}
upgradePolicy:
autoUpgrade: true
drain:
deleteEmptyDir: true
enable: true
force: true
timeoutSeconds: 300
maxParallelUpgrades: 1
startupProbe:
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 30
readinessProbe:
initialDelaySeconds: 10
periodSeconds: 30
rdmaSharedDevicePlugin:
image: {{ .RdmaSharedDevicePlugin.Image }}
repository: {{ .RdmaSharedDevicePlugin.Repository }}
version: {{ .RdmaSharedDevicePlugin.Version }}
# The config below directly propagates to k8s-rdma-shared-device-plugin configuration.
# Replace 'devices' with your (RDMA capable) netdevice name.
config: |
{
"configList": [
{
"resourceName": "rdma_shared_device_a",
"rdmaHcaMax": 63,
"selectors": {
"vendors": ["15b3"],
"deviceIDs": ["101b"]
}
}
]
}
sriovDevicePlugin:
image: {{ .SriovDevicePlugin.Image }}
repository: {{ .SriovDevicePlugin.Repository }}
version: {{ .SriovDevicePlugin.Version }}
config: |
{
"resourceList": [
{
"resourcePrefix": "nvidia.com",
"resourceName": "hostdev",
"selectors": {
"vendors": ["15b3"],
"isRdma": true
}
}
]
}
secondaryNetwork:
cniPlugins:
image: {{ .CniPlugins.Image }}
repository: {{ .CniPlugins.Repository }}
version: {{ .CniPlugins.Version }}
ipoib:
image: {{ .Ipoib.Image }}
repository: {{ .Ipoib.Repository }}
version: {{ .Ipoib.Version }}
multus:
image: {{ .Multus.Image }}
repository: {{ .Multus.Repository }}
version: {{ .Multus.Version }}
config: ''
ipamPlugin:
image: {{ .IpamPlugin.Image }}
repository: {{ .IpamPlugin.Repository }}
version: {{ .IpamPlugin.Version }}
nvIpam:
image: {{ .NvIPAM.Image }}
repository: {{ .NvIPAM.Repository }}
version: {{ .NvIPAM.Version }}
enableWebhook: false
ibKubernetes:
image: {{ .IbKubernetes.Image }}
repository: {{ .IbKubernetes.Repository }}
version: {{ .IbKubernetes.Version }}
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
ufmSecret: ufm-secret
nicFeatureDiscovery:
image: {{ .NicFeatureDiscovery.Image }}
repository: {{ .NicFeatureDiscovery.Repository }}
version: {{ .NicFeatureDiscovery.Version }}
docaTelemetryService:
image: {{ .DOCATelemetryService.Image }}
repository: {{ .DOCATelemetryService.Repository }}
version: {{ .DOCATelemetryService.Version }}
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,45 @@ spec:
}
]
}
sriovDevicePlugin:
image: {{ .SriovDevicePlugin.Image }}
repository: {{ .SriovDevicePlugin.Repository }}
version: {{ .SriovDevicePlugin.Version }}
config: |
{
"resourceList": [
{
"resourcePrefix": "nvidia.com",
"resourceName": "hostdev",
"selectors": {
"vendors": ["15b3"],
"isRdma": true
}
}
]
}
nvIpam:
image: {{ .NvIPAM.Image }}
repository: {{ .NvIPAM.Repository }}
version: {{ .NvIPAM.Version }}
enableWebhook: false
ibKubernetes:
image: {{ .IbKubernetes.Image }}
repository: {{ .IbKubernetes.Repository }}
version: {{ .IbKubernetes.Version }}
pKeyGUIDPoolRangeStart: "02:00:00:00:00:00:00:00"
pKeyGUIDPoolRangeEnd: "02:FF:FF:FF:FF:FF:FF:FF"
ufmSecret: ufm-secret
nicFeatureDiscovery:
image: {{ .NicFeatureDiscovery.Image }}
repository: {{ .NicFeatureDiscovery.Repository }}
version: {{ .NicFeatureDiscovery.Version }}
docaTelemetryService:
image: {{ .DOCATelemetryService.Image }}
repository: {{ .DOCATelemetryService.Repository }}
version: {{ .DOCATelemetryService.Version }}
secondaryNetwork:
ipoib:
image: {{ .Ipoib.Image }}
repository: {{ .Ipoib.Repository }}
version: {{ .Ipoib.Version }}

0 comments on commit fb62abf

Please sign in to comment.