Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions controllers/object_controls.go
Original file line number Diff line number Diff line change
Expand Up @@ -3680,6 +3680,10 @@ func transformDriverContainer(obj *appsv1.DaemonSet, config *gpuv1.ClusterPolicy
if err != nil {
return fmt.Errorf("ERROR: failed to get path items for subscription entitlements: %v", err)
}
// Custom repo ConfigMap supplies yum repos in offline/air-gapped installs. Skip mounting host RHSM paths when using a custom repo ConfigMap
if config.Driver.RepoConfig != nil && config.Driver.RepoConfig.ConfigMapName != "" && osID == "rhel" {
pathToVolumeSource = MountPathToVolumeSource{}
}

// sort host path volumes to ensure ordering is preserved when adding to pod spec
mountPaths := make([]string, 0, len(pathToVolumeSource))
Expand Down
4 changes: 4 additions & 0 deletions internal/state/driver_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ func (s *stateDriver) getDriverAdditionalConfigs(ctx context.Context, cr *v1alph
if err != nil {
return nil, fmt.Errorf("ERROR: failed to get path items for subscription entitlements: %v", err)
}
// Custom repo ConfigMap supplies yum repos in offline/air-gapped installs. Skip mounting host RHSM paths when using a custom repo ConfigMap
if cr.Spec.IsRepoConfigEnabled() && pool.osRelease == "rhel" {
pathToVolumeSource = map[string]corev1.VolumeSource{}
}

// sort host path volumes to ensure ordering is preserved when adding to pod spec
mountPaths := make([]string, 0, len(pathToVolumeSource))
Expand Down