Skip to content

Commit f36b760

Browse files
authored
ofed-driver: Adjust mount path for Ubuntu system CA certificates (Mellanox#1643)
This PR adds a postStart lifecycle hook in the MOFED container to run update-ca-certificates (Ubuntu/Debian) or update-ca-trust (RHEL/SLES), ensuring system trust store picks up any mounted CA certs. Tested on: Ubuntu 24.04 This avoids the need to rebuild the image just to inject CA certs.
2 parents d58ae6c + f291e81 commit f36b760

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/state/state_ofed.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const (
114114
//
115115
//nolint:lll
116116
var CertConfigPathMap = map[string]string{
117-
"ubuntu": "/etc/ssl/certs",
117+
"ubuntu": "/usr/local/share/ca-certificates",
118118
"rhcos": "/etc/pki/ca-trust/extracted/pem",
119119
"rhel": "/etc/pki/ca-trust/extracted/pem",
120120
"sles": "/etc/ssl",

pkg/state/state_ofed_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ func verifyAdditionalMounts(mounts []v1.VolumeMount) {
14601460
cert := v1.VolumeMount{
14611461
Name: "cert-cm",
14621462
ReadOnly: true,
1463-
MountPath: "/etc/ssl/certs/my-cert",
1463+
MountPath: "/usr/local/share/ca-certificates/my-cert",
14641464
SubPath: "my-cert",
14651465
MountPropagation: nil,
14661466
SubPathExpr: "",

0 commit comments

Comments
 (0)