Skip to content

Commit 7376f22

Browse files
Merge pull request #127 from almaslennikov/bfb-update
feat: provision and install BFB files
2 parents 99c4537 + d29691b commit 7376f22

23 files changed

+1969
-135
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.

cmd/nic-configuration-daemon/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func main() {
119119

120120
configurationManager := configuration.NewConfigurationManager(eventRecorder, dmsManager)
121121
maintenanceManager := maintenance.New(mgr.GetClient(), hostUtils, nodeName, namespace)
122-
firmwareManager := firmware.NewFirmwareManager(mgr.GetClient(), namespace)
122+
firmwareManager := firmware.NewFirmwareManager(mgr.GetClient(), dmsManager, namespace)
123123

124124
if err := initNicFwMap(namespace); err != nil {
125125
log.Log.Error(err, "unable to init NicFwMap")

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

0 commit comments

Comments
 (0)