diff --git a/config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml b/config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml index e29c63424..c5e490392 100644 --- a/config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml +++ b/config/samples/mellanox.com_v1alpha1_nicclusterpolicy.yaml @@ -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 diff --git a/example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.yaml b/example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.yaml new file mode 100644 index 000000000..693f0a235 --- /dev/null +++ b/example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.yaml @@ -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 diff --git a/hack/templates/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.template b/hack/templates/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.template new file mode 100644 index 000000000..4fc27e7af --- /dev/null +++ b/hack/templates/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.template @@ -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 }} diff --git a/hack/templates/samples/mellanox.com_v1alpha1_nicclusterpolicy.template b/hack/templates/samples/mellanox.com_v1alpha1_nicclusterpolicy.template index 3af1a3e7e..d663051f0 100644 --- a/hack/templates/samples/mellanox.com_v1alpha1_nicclusterpolicy.template +++ b/hack/templates/samples/mellanox.com_v1alpha1_nicclusterpolicy.template @@ -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 }}