Skip to content

Commit d225adb

Browse files
committed
Extend NicFirmwareSource CR with BFB URL Source
Signed-off-by: Alexander Maslennikov <[email protected]>
1 parent 5d9eeca commit d225adb

File tree

6 files changed

+131
-84
lines changed

6 files changed

+131
-84
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ spec:
135135
# a list of firmware binaries from mlnx website if they are zipped try to unzip before placing
136136
binUrlSources:
137137
- https://www.mellanox.com/downloads/firmware/fw-ConnectX6Dx-rel-22_44_1036-MCX623106AC-CDA_Ax-UEFI-14.37.14-FlexBoot-3.7.500.signed.bin.zip
138+
bfbUrlSource: https://example.com/bluefield3-31.41.0.bfb
139+
status:
140+
state: Success
141+
binaryVersions:
142+
22.44.1036:
143+
- mt_0000000436
144+
bfbVersions:
145+
a2dc: 34.41.0 # BF3 NIC FW
146+
a2d6: 25.21.0 # BF2 NIC FW
138147
```
139148

140149
### NICFirmwareTemplate

api/v1alpha1/nicfirmwaresource_types.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@ package v1alpha1
1818
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1919

2020
// NicFirmwareSourceSpec represents a list of url sources for FW
21+
// +kubebuilder:validation:XValidation:rule="size(self.binUrlSources) > 0 || size(self.bfbUrlSource) > 0",message="At least one of binUrlSources or bfbUrlSource must be specified"
2122
type NicFirmwareSourceSpec struct {
22-
// BinUrlSources represents a list of url sources for FW
23+
// BinUrlSources represents a list of url sources for ConnectX Firmware
2324
// +kubebuilder:validation:MinItems=1
24-
// +required
25-
BinUrlSources []string `json:"binUrlSources"`
25+
// +optional
26+
BinUrlSources []string `json:"binUrlSources,omitempty"`
27+
// BFBUrlSource represents a url source for BlueField Bundle
28+
// +optional
29+
BFBUrlSource string `json:"bfbUrlSource,omitempty"`
2630
}
2731

2832
// NicFirmwareSourceStatus represents the status of the FW from given sources, e.g. version available for PSIDs
@@ -33,9 +37,11 @@ type NicFirmwareSourceStatus struct {
3337
State string `json:"state"`
3438
// Reason shows an error message if occurred
3539
Reason string `json:"reason,omitempty"`
36-
// Versions is a map of available FW versions to PSIDs
40+
// Versions is a map of available FW binaries versions to PSIDs
3741
// a PSID should have only a single FW version available for it
38-
Versions map[string][]string `json:"versions,omitempty"`
42+
BinaryVersions map[string][]string `json:"binaryVersions,omitempty"`
43+
// BFBVersions represents the FW versions available in the provided BFB bundle
44+
BFBVersions map[string]string `json:"bfbVersions,omitempty"`
3945
}
4046

4147
//+kubebuilder:object:root=true

api/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/configuration.net.nvidia.com_nicfirmwaresources.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,39 @@ spec:
4040
description: NicFirmwareSourceSpec represents a list of url sources for
4141
FW
4242
properties:
43+
bfbUrlSource:
44+
description: BFBUrlSource represents a url source for BlueField Bundle
45+
type: string
4346
binUrlSources:
44-
description: BinUrlSources represents a list of url sources for FW
47+
description: BinUrlSources represents a list of url sources for ConnectX
48+
Firmware
4549
items:
4650
type: string
4751
minItems: 1
4852
type: array
49-
required:
50-
- binUrlSources
5153
type: object
54+
x-kubernetes-validations:
55+
- message: At least one of binUrlSources or bfbUrlSource must be specified
56+
rule: size(self.binUrlSources) > 0 || size(self.bfbUrlSource) > 0
5257
status:
5358
description: NicFirmwareSourceStatus represents the status of the FW from
5459
given sources, e.g. version available for PSIDs
5560
properties:
61+
bfbVersions:
62+
additionalProperties:
63+
type: string
64+
description: BFBVersions represents the FW versions available in the
65+
provided BFB bundle
66+
type: object
67+
binaryVersions:
68+
additionalProperties:
69+
items:
70+
type: string
71+
type: array
72+
description: |-
73+
Versions is a map of available FW binaries versions to PSIDs
74+
a PSID should have only a single FW version available for it
75+
type: object
5676
reason:
5777
description: Reason shows an error message if occurred
5878
type: string
@@ -66,15 +86,6 @@ spec:
6686
- DownloadFailed
6787
- CacheVerificationFailed
6888
type: string
69-
versions:
70-
additionalProperties:
71-
items:
72-
type: string
73-
type: array
74-
description: |-
75-
Versions is a map of available FW versions to PSIDs
76-
a PSID should have only a single FW version available for it
77-
type: object
7889
required:
7990
- state
8091
type: object

deployment/nic-configuration-operator-chart/crds/configuration.net.nvidia.com_nicfirmwaresources.yaml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,39 @@ spec:
4040
description: NicFirmwareSourceSpec represents a list of url sources for
4141
FW
4242
properties:
43+
bfbUrlSource:
44+
description: BFBUrlSource represents a url source for BlueField Bundle
45+
type: string
4346
binUrlSources:
44-
description: BinUrlSources represents a list of url sources for FW
47+
description: BinUrlSources represents a list of url sources for ConnectX
48+
Firmware
4549
items:
4650
type: string
4751
minItems: 1
4852
type: array
49-
required:
50-
- binUrlSources
5153
type: object
54+
x-kubernetes-validations:
55+
- message: At least one of binUrlSources or bfbUrlSource must be specified
56+
rule: size(self.binUrlSources) > 0 || size(self.bfbUrlSource) > 0
5257
status:
5358
description: NicFirmwareSourceStatus represents the status of the FW from
5459
given sources, e.g. version available for PSIDs
5560
properties:
61+
bfbVersions:
62+
additionalProperties:
63+
type: string
64+
description: BFBVersions represents the FW versions available in the
65+
provided BFB bundle
66+
type: object
67+
binaryVersions:
68+
additionalProperties:
69+
items:
70+
type: string
71+
type: array
72+
description: |-
73+
Versions is a map of available FW binaries versions to PSIDs
74+
a PSID should have only a single FW version available for it
75+
type: object
5676
reason:
5777
description: Reason shows an error message if occurred
5878
type: string
@@ -66,15 +86,6 @@ spec:
6686
- DownloadFailed
6787
- CacheVerificationFailed
6888
type: string
69-
versions:
70-
additionalProperties:
71-
items:
72-
type: string
73-
type: array
74-
description: |-
75-
Versions is a map of available FW versions to PSIDs
76-
a PSID should have only a single FW version available for it
77-
type: object
7889
required:
7990
- state
8091
type: object

docs/api-reference.md

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ ConfigurationTemplateSpec is a set of configurations for the NICs
5757

5858
### FirmwareTemplateSpec
5959

60-
(*Appears on:*[NicFirmwareTemplateSpec](#NicFirmwareTemplateSpec))
60+
(*Appears on:*[NicDeviceSpec](#NicDeviceSpec), [NicFirmwareTemplateSpec](#NicFirmwareTemplateSpec))
6161

6262
FirmwareTemplateSpec specifies a FW update policy for a given FW source ref
6363

@@ -183,7 +183,7 @@ each PF - Mstconfig -d set ADVANCED_PCI_SETTINGS=1 * Node reboot - Applies new N
183183
</tr>
184184
<tr>
185185
<td><code>status</code><br />
186-
<em><a href="#NicConfigurationTemplateStatus">NicConfigurationTemplateStatus</a></em></td>
186+
<em><a href="#NicTemplateStatus">NicTemplateStatus</a></em></td>
187187
<td><p>Defines the observed state of NicConfigurationTemplate</p></td>
188188
</tr>
189189
</tbody>
@@ -232,32 +232,6 @@ each PF - Mstconfig -d set ADVANCED_PCI_SETTINGS=1 * Node reboot - Applies new N
232232
</tbody>
233233
</table>
234234

235-
### NicConfigurationTemplateStatus
236-
237-
(*Appears on:*[NicConfigurationTemplate](#NicConfigurationTemplate))
238-
239-
NicConfigurationTemplateStatus defines the observed state of NicConfigurationTemplate
240-
241-
<table>
242-
<colgroup>
243-
<col style="width: 50%" />
244-
<col style="width: 50%" />
245-
</colgroup>
246-
<thead>
247-
<tr>
248-
<th>Field</th>
249-
<th>Description</th>
250-
</tr>
251-
</thead>
252-
<tbody>
253-
<tr>
254-
<td><code>nicDevices</code><br />
255-
<em>[]string</em></td>
256-
<td><p>NicDevice CRs matching this configuration template</p></td>
257-
</tr>
258-
</tbody>
259-
</table>
260-
261235
### NicDevice
262236

263237
NicDevice is the Schema for the nicdevices API
@@ -295,6 +269,11 @@ NicDevice is the Schema for the nicdevices API
295269
<em><a href="#NicDeviceConfigurationSpec">NicDeviceConfigurationSpec</a></em></td>
296270
<td><p>Configuration specifies the configuration requested by NicConfigurationTemplate</p></td>
297271
</tr>
272+
<tr>
273+
<td><code>firmware</code><br />
274+
<em><a href="#FirmwareTemplateSpec">FirmwareTemplateSpec</a></em></td>
275+
<td><p>Firmware specifies the fw upgrade policy requested by NicFirmwareTemplate</p></td>
276+
</tr>
298277
</tbody>
299278
</table></td>
300279
</tr>
@@ -398,6 +377,11 @@ NicDeviceSpec defines the desired state of NicDevice
398377
<em><a href="#NicDeviceConfigurationSpec">NicDeviceConfigurationSpec</a></em></td>
399378
<td><p>Configuration specifies the configuration requested by NicConfigurationTemplate</p></td>
400379
</tr>
380+
<tr>
381+
<td><code>firmware</code><br />
382+
<em><a href="#FirmwareTemplateSpec">FirmwareTemplateSpec</a></em></td>
383+
<td><p>Firmware specifies the fw upgrade policy requested by NicFirmwareTemplate</p></td>
384+
</tr>
401385
</tbody>
402386
</table>
403387

@@ -497,7 +481,14 @@ NicFirmwareSource is the Schema for the nicfirmwaresources API
497481
<tr>
498482
<td><code>binUrlSources</code><br />
499483
<em>[]string</em></td>
500-
<td><p>BinUrlSources represents a list of url sources for FW</p></td>
484+
<td><em>(Optional)</em>
485+
<p>BinUrlSources represents a list of url sources for ConnectX Firmware</p></td>
486+
</tr>
487+
<tr>
488+
<td><code>bfbUrlSource</code><br />
489+
<em>string</em></td>
490+
<td><em>(Optional)</em>
491+
<p>BFBUrlSource represents a url source for BlueField Bundle</p></td>
501492
</tr>
502493
</tbody>
503494
</table></td>
@@ -531,7 +522,14 @@ NicFirmwareSourceSpec represents a list of url sources for FW
531522
<tr>
532523
<td><code>binUrlSources</code><br />
533524
<em>[]string</em></td>
534-
<td><p>BinUrlSources represents a list of url sources for FW</p></td>
525+
<td><em>(Optional)</em>
526+
<p>BinUrlSources represents a list of url sources for ConnectX Firmware</p></td>
527+
</tr>
528+
<tr>
529+
<td><code>bfbUrlSource</code><br />
530+
<em>string</em></td>
531+
<td><em>(Optional)</em>
532+
<p>BFBUrlSource represents a url source for BlueField Bundle</p></td>
535533
</tr>
536534
</tbody>
537535
</table>
@@ -569,6 +567,11 @@ NicFirmwareSourceStatus represents the status of the FW from given sources, e.g.
569567
<em>map[string][]string</em></td>
570568
<td><p>Versions is a map of available FW versions to PSIDs a PSID should have only a single FW version available for it</p></td>
571569
</tr>
570+
<tr>
571+
<td><code>bfbVersions</code><br />
572+
<em>map[string]string</em></td>
573+
<td><p>BFBVersions represents the FW versions available in the provided BFB bundle</p></td>
574+
</tr>
572575
</tbody>
573576
</table>
574577

@@ -624,7 +627,7 @@ NicFirmwareTemplate is the Schema for the nicfirmwaretemplates API
624627
</tr>
625628
<tr>
626629
<td><code>status</code><br />
627-
<em><a href="#NicFirmwareTemplateStatus">NicFirmwareTemplateStatus</a></em></td>
630+
<em><a href="#NicTemplateStatus">NicTemplateStatus</a></em></td>
628631
<td></td>
629632
</tr>
630633
</tbody>
@@ -666,11 +669,12 @@ NicFirmwareTemplateSpec defines the FW templates and node/nic selectors for it
666669
</tbody>
667670
</table>
668671

669-
### NicFirmwareTemplateStatus
672+
### NicSelectorSpec
670673

671-
(*Appears on:*[NicFirmwareTemplate](#NicFirmwareTemplate))
674+
(*Appears on:*[NicConfigurationTemplateSpec](#NicConfigurationTemplateSpec),
675+
[NicFirmwareTemplateSpec](#NicFirmwareTemplateSpec))
672676

673-
NicFirmwareTemplateStatus lists the NicDevice CRs matching the FW template
677+
NicSelectorSpec is a desired configuration for NICs
674678

675679
<table>
676680
<colgroup>
@@ -685,19 +689,28 @@ NicFirmwareTemplateStatus lists the NicDevice CRs matching the FW template
685689
</thead>
686690
<tbody>
687691
<tr>
688-
<td><code>nicDevices</code><br />
692+
<td><code>nicType</code><br />
693+
<em>string</em></td>
694+
<td><p>Type of the NIC to be selected, e.g. 101d,1015,a2d6 etc.</p></td>
695+
</tr>
696+
<tr>
697+
<td><code>pciAddresses</code><br />
698+
<em>[]string</em></td>
699+
<td><p>Array of PCI addresses to be selected, e.g. “0000:03:00.0”</p></td>
700+
</tr>
701+
<tr>
702+
<td><code>serialNumbers</code><br />
689703
<em>[]string</em></td>
690-
<td><p>NicDevice CRs matching this firmware template</p></td>
704+
<td><p>Serial numbers of the NICs to be selected, e.g. MT2116X09299</p></td>
691705
</tr>
692706
</tbody>
693707
</table>
694708

695-
### NicSelectorSpec
709+
### NicTemplateStatus
696710

697-
(*Appears on:*[NicConfigurationTemplateSpec](#NicConfigurationTemplateSpec),
698-
[NicFirmwareTemplateSpec](#NicFirmwareTemplateSpec))
711+
(*Appears on:*[NicConfigurationTemplate](#NicConfigurationTemplate), [NicFirmwareTemplate](#NicFirmwareTemplate))
699712

700-
NicSelectorSpec is a desired configuration for NICs
713+
NicTemplateStatus defines the observed state of NicConfigurationTemplate and NicFirmwareTemplate
701714

702715
<table>
703716
<colgroup>
@@ -712,19 +725,9 @@ NicSelectorSpec is a desired configuration for NICs
712725
</thead>
713726
<tbody>
714727
<tr>
715-
<td><code>nicType</code><br />
716-
<em>string</em></td>
717-
<td><p>Type of the NIC to be selected, e.g. 101d,1015,a2d6 etc.</p></td>
718-
</tr>
719-
<tr>
720-
<td><code>pciAddresses</code><br />
721-
<em>[]string</em></td>
722-
<td><p>Array of PCI addresses to be selected, e.g. “0000:03:00.0”</p></td>
723-
</tr>
724-
<tr>
725-
<td><code>serialNumbers</code><br />
728+
<td><code>nicDevices</code><br />
726729
<em>[]string</em></td>
727-
<td><p>Serial numbers of the NICs to be selected, e.g. MT2116X09299</p></td>
730+
<td><p>NicDevice CRs matching this configuration / firmware template</p></td>
728731
</tr>
729732
</tbody>
730733
</table>
@@ -829,4 +832,4 @@ RoceOptimizedSpec specifies RoCE optimization settings
829832

830833
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
831834

832-
*Generated with `gen-crd-api-reference-docs` on git commit `7bb08b0`.*
835+
*Generated with `gen-crd-api-reference-docs` on git commit `5c0e1e9`.*

0 commit comments

Comments
 (0)