Skip to content

Commit 1f81bf4

Browse files
committed
feat: Add NVIDIA Spectrum-X Operator deployment
NicClusterPolicy now contains SpectrumXOperator feild which allows to deploy Spectrum-X Operator. Signed-off-by: Ivan Kolodiazhnyi <[email protected]>
1 parent da7e5aa commit 1f81bf4

19 files changed

+1114
-311
lines changed

api/v1alpha1/nicclusterpolicy_types.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,16 @@ type NicConfigurationOperatorSpec struct {
325325
LogLevel string `json:"logLevel,omitempty"`
326326
}
327327

328+
// SpectrumXOperatorSpec describes configuration options for NVIDIA Spectrum-X Operator
329+
type SpectrumXOperatorSpec struct {
330+
// Image information for NVIDIA Spectrum-X Operator
331+
ImageSpec `json:""`
332+
// Spectrum-X Operator ConfigMap name
333+
SpectrumXConfig *ConfigMapNameReference `json:"spectrumXConfig,omitempty"`
334+
// SR-IOV Network Operator and related CRDs namespace
335+
SriovObjNamespace string `json:"sriovObjNamespace,omitempty"`
336+
}
337+
328338
// NicClusterPolicySpec defines the desired state of NicClusterPolicy
329339
type NicClusterPolicySpec struct {
330340
// OFEDDriver is a specialized driver for NVIDIA NICs which can replace the inbox driver that comes with an OS.
@@ -366,6 +376,9 @@ type NicClusterPolicySpec struct {
366376
// NicConfigurationOperator provides Kubernetes CRD API to allow FW configuration on NVIDIA NICs in a coordinated manner
367377
// See: https://github.com/Mellanox/nic-configuration-operator
368378
NicConfigurationOperator *NicConfigurationOperatorSpec `json:"nicConfigurationOperator,omitempty"`
379+
// SpectrumXOperator exposes NVIDIA Spectrum-X Operator.
380+
// See: https://github.com/Mellanox/spectrum-x-operator/
381+
SpectrumXOperator *SpectrumXOperatorSpec `json:"spectrumXOperator,omitempty"`
369382
// NodeAffinity rules to inject to the DaemonSets objects that are managed by the operator
370383
NodeAffinity *v1.NodeAffinity `json:"nodeAffinity,omitempty"`
371384
// Tolerations to inject to the DaemonSets objects that are managed by the operator

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/mellanox.com_nicclusterpolicies.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,84 @@ spec:
14231423
- version
14241424
type: object
14251425
type: object
1426+
spectrumXOperator:
1427+
description: |-
1428+
SpectrumXOperator exposes NVIDIA Spectrum-X Operator.
1429+
See: https://github.com/Mellanox/spectrum-x-operator/
1430+
properties:
1431+
containerResources:
1432+
description: ResourceRequirements describes the compute resource
1433+
requirements
1434+
items:
1435+
description: ResourceRequirements describes the compute resource
1436+
requirements.
1437+
properties:
1438+
limits:
1439+
additionalProperties:
1440+
anyOf:
1441+
- type: integer
1442+
- type: string
1443+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1444+
x-kubernetes-int-or-string: true
1445+
description: |-
1446+
Limits describes the maximum amount of compute resources allowed.
1447+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1448+
type: object
1449+
name:
1450+
description: Name of the container the requirements are
1451+
set for
1452+
type: string
1453+
requests:
1454+
additionalProperties:
1455+
anyOf:
1456+
- type: integer
1457+
- type: string
1458+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1459+
x-kubernetes-int-or-string: true
1460+
description: |-
1461+
Requests describes the minimum amount of compute resources required.
1462+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
1463+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
1464+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1465+
type: object
1466+
required:
1467+
- name
1468+
type: object
1469+
type: array
1470+
image:
1471+
description: Name of the image
1472+
pattern: '[a-zA-Z0-9\-]+'
1473+
type: string
1474+
imagePullSecrets:
1475+
default: []
1476+
description: |-
1477+
ImagePullSecrets is an optional list of references to secrets in the same
1478+
namespace to use for pulling the image
1479+
items:
1480+
type: string
1481+
type: array
1482+
repository:
1483+
description: Address of the registry that stores the image
1484+
pattern: '[a-zA-Z0-9\.\-\/]+'
1485+
type: string
1486+
spectrumXConfig:
1487+
description: Spectrum-X Operator ConfigMap name
1488+
properties:
1489+
name:
1490+
description: Name of the ConfigMap
1491+
type: string
1492+
type: object
1493+
sriovObjNamespace:
1494+
description: SR-IOV Network Operator and related CRDs namespace
1495+
type: string
1496+
version:
1497+
description: Version of the image to use
1498+
type: string
1499+
required:
1500+
- image
1501+
- repository
1502+
- version
1503+
type: object
14261504
sriovDevicePlugin:
14271505
description: |-
14281506
SriovDevicePlugin manages SRIOV through the Kubernetes device plugin framework.

deployment/network-operator/crds/mellanox.com_nicclusterpolicies.yaml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,84 @@ spec:
14231423
- version
14241424
type: object
14251425
type: object
1426+
spectrumXOperator:
1427+
description: |-
1428+
SpectrumXOperator exposes NVIDIA Spectrum-X Operator.
1429+
See: https://github.com/Mellanox/spectrum-x-operator/
1430+
properties:
1431+
containerResources:
1432+
description: ResourceRequirements describes the compute resource
1433+
requirements
1434+
items:
1435+
description: ResourceRequirements describes the compute resource
1436+
requirements.
1437+
properties:
1438+
limits:
1439+
additionalProperties:
1440+
anyOf:
1441+
- type: integer
1442+
- type: string
1443+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1444+
x-kubernetes-int-or-string: true
1445+
description: |-
1446+
Limits describes the maximum amount of compute resources allowed.
1447+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1448+
type: object
1449+
name:
1450+
description: Name of the container the requirements are
1451+
set for
1452+
type: string
1453+
requests:
1454+
additionalProperties:
1455+
anyOf:
1456+
- type: integer
1457+
- type: string
1458+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1459+
x-kubernetes-int-or-string: true
1460+
description: |-
1461+
Requests describes the minimum amount of compute resources required.
1462+
If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
1463+
otherwise to an implementation-defined value. Requests cannot exceed Limits.
1464+
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
1465+
type: object
1466+
required:
1467+
- name
1468+
type: object
1469+
type: array
1470+
image:
1471+
description: Name of the image
1472+
pattern: '[a-zA-Z0-9\-]+'
1473+
type: string
1474+
imagePullSecrets:
1475+
default: []
1476+
description: |-
1477+
ImagePullSecrets is an optional list of references to secrets in the same
1478+
namespace to use for pulling the image
1479+
items:
1480+
type: string
1481+
type: array
1482+
repository:
1483+
description: Address of the registry that stores the image
1484+
pattern: '[a-zA-Z0-9\.\-\/]+'
1485+
type: string
1486+
spectrumXConfig:
1487+
description: Spectrum-X Operator ConfigMap name
1488+
properties:
1489+
name:
1490+
description: Name of the ConfigMap
1491+
type: string
1492+
type: object
1493+
sriovObjNamespace:
1494+
description: SR-IOV Network Operator and related CRDs namespace
1495+
type: string
1496+
version:
1497+
description: Version of the image to use
1498+
type: string
1499+
required:
1500+
- image
1501+
- repository
1502+
- version
1503+
type: object
14261504
sriovDevicePlugin:
14271505
description: |-
14281506
SriovDevicePlugin manages SRIOV through the Kubernetes device plugin framework.

0 commit comments

Comments
 (0)