Skip to content

Commit dca74af

Browse files
authored
chore: DOCA-OFED Driver container doca3.1.0-25.07-0.6.6.0-0 (#1552)
2 parents 1804937 + 0657caf commit dca74af

11 files changed

+33
-11
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ release-build:
423423

424424
.PHONY: check-doca-drivers
425425
check-doca-drivers: $(HACKTMPDIR)
426-
$(eval DRIVERVERSION := $(shell yq '.Mofed.version' hack/release.yaml | cut -d'-' -f1))
426+
$(eval DRIVERVERSION := $(shell yq '.Mofed.version' hack/release.yaml | sed 's/^doca[0-9]\+\.[0-9]\+\.0-//' | cut -d'-' -f1))
427427
wget $(DOCA_DRIVER_RELEASE_URL)$(DRIVERVERSION).yaml -O $(HACKTMPDIR)/doca-driver-matrix.yaml
428428
cd hack && $(GO) run release.go --doca-driver-check --doca-driver-matrix $(HACKTMPDIR)/doca-driver-matrix.yaml
429429

api/v1alpha1/validator/nicclusterpolicy_webhook.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func (ofedSpec *ofedDriverSpecWrapper) validateVersion(fldPath *field.Path) fiel
468468
// Perform version validation logic here
469469
if !isValidOFEDVersion(ofedSpec.Version) {
470470
allErrs = append(allErrs, field.Invalid(fldPath.Child("version"), ofedSpec.Version,
471-
`invalid OFED version, the regex used for validation is ^(\d+\.\d+-\d+(\.\d+)*)$ `))
471+
`invalid OFED version, supported formats: "23.10-0.2.2.0", "24.01-0.3.3.1-0", "doca3.1-24.01-0.3.3.1-0"`))
472472
}
473473
return allErrs
474474
}
@@ -717,7 +717,11 @@ func validateResources(resources map[v1.ResourceName]apiresource.Quantity, allEr
717717

718718
// isValidOFEDVersion is a custom function to validate OFED version
719719
func isValidOFEDVersion(version string) bool {
720-
versionPattern := `^(\d+\.\d+-\d+(\.\d+)*(-\d+)?)$`
720+
// Support multiple OFED version formats:
721+
// 1. Old scheme: "23.10-0.2.2.0" or "23.10-0.2.2.0.1"
722+
// 2. New scheme: "24.01-0.3.3.1-0"
723+
// 3. DOCA prefix: "doca3.1-24.01-0.3.3.1-0"
724+
versionPattern := `^(doca\d+\.\d+-\d+\.\d+-\d+\.\d+\.\d+\.\d+-\d+|\d+\.\d+-\d+(\.\d+)*(-\d+)?)$`
721725
versionRegex := regexp.MustCompile(versionPattern)
722726
return versionRegex.MatchString(version)
723727
}

api/v1alpha1/validator/nicclusterpolicy_webhook_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ var _ = Describe("Validate", func() {
136136
_, err := validator.ValidateCreate(context.TODO(), nicClusterPolicy)
137137
Expect(err).NotTo(HaveOccurred())
138138
})
139+
It("Valid MOFED version (with doca prefix)", func() {
140+
validator := nicClusterPolicyValidator{}
141+
nicClusterPolicy := &v1alpha1.NicClusterPolicy{
142+
ObjectMeta: metav1.ObjectMeta{Name: "test"},
143+
Spec: v1alpha1.NicClusterPolicySpec{
144+
OFEDDriver: &v1alpha1.OFEDDriverSpec{
145+
ImageSpec: v1alpha1.ImageSpec{
146+
Image: "mofed",
147+
Repository: "ghcr.io/mellanox",
148+
Version: "doca3.1-24.01-0.3.3.1-0",
149+
ImagePullSecrets: []string{},
150+
},
151+
},
152+
},
153+
}
154+
_, err := validator.ValidateCreate(context.TODO(), nicClusterPolicy)
155+
Expect(err).NotTo(HaveOccurred())
156+
})
139157
It("Valid MOFED version", func() {
140158
validator := nicClusterPolicyValidator{}
141159
nicClusterPolicy := &v1alpha1.NicClusterPolicy{

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full-ocp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
ofedDriver:
2525
image: doca-driver
2626
repository: nvcr.io/nvstaging/mellanox
27-
version: 25.04-0.6.1.0-2
27+
version: doca3.1.0-25.07-0.6.6.0-0
2828
upgradePolicy:
2929
autoUpgrade: true
3030
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
ofedDriver:
2525
image: doca-driver
2626
repository: nvcr.io/nvstaging/mellanox
27-
version: 25.04-0.6.1.0-2
27+
version: doca3.1.0-25.07-0.6.6.0-0
2828
upgradePolicy:
2929
autoUpgrade: true
3030
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-ipoib.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
ofedDriver:
2020
image: doca-driver
2121
repository: nvcr.io/nvstaging/mellanox
22-
version: 25.04-0.6.1.0-2
22+
version: doca3.1.0-25.07-0.6.6.0-0
2323
upgradePolicy:
2424
autoUpgrade: true
2525
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-nvidia-ipam.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
ofedDriver:
2020
image: doca-driver
2121
repository: nvcr.io/nvstaging/mellanox
22-
version: 25.04-0.6.1.0-2
22+
version: doca3.1.0-25.07-0.6.6.0-0
2323
upgradePolicy:
2424
autoUpgrade: true
2525
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-ocp-hostdev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
ofedDriver:
2020
image: doca-driver
2121
repository: nvcr.io/nvstaging/mellanox
22-
version: 25.04-0.6.1.0-2
22+
version: doca3.1.0-25.07-0.6.6.0-0
2323
upgradePolicy:
2424
autoUpgrade: true
2525
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr-ocp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
ofedDriver:
2020
image: doca-driver
2121
repository: nvcr.io/nvstaging/mellanox
22-
version: 25.04-0.6.1.0-2
22+
version: doca3.1.0-25.07-0.6.6.0-0
2323
upgradePolicy:
2424
autoUpgrade: true
2525
drain:

example/crs/mellanox.com_v1alpha1_nicclusterpolicy_cr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
ofedDriver:
2020
image: doca-driver
2121
repository: nvcr.io/nvstaging/mellanox
22-
version: 25.04-0.6.1.0-2
22+
version: doca3.1.0-25.07-0.6.6.0-0
2323
upgradePolicy:
2424
autoUpgrade: true
2525
drain:

0 commit comments

Comments
 (0)