Skip to content

Commit

Permalink
Merge pull request #709 from e0ne/validation-cleanup
Browse files Browse the repository at this point in the history
Remove webhook validation for InfiniBand and RDMA
  • Loading branch information
SchSeba authored Jul 1, 2024
2 parents 5858836 + 78bde32 commit 8835035
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/webhook/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,6 @@ func staticValidateSriovNetworkNodePolicy(cr *sriovnetworkv1.SriovNetworkNodePol
if cr.Spec.DeviceType == consts.DeviceTypeVfioPci && cr.Spec.IsRdma {
return false, fmt.Errorf("'deviceType: vfio-pci' conflicts with 'isRdma: true'; Set 'deviceType' to (string)'netdevice' Or Set 'isRdma' to (bool)'false'")
}
if strings.EqualFold(cr.Spec.LinkType, consts.LinkTypeIB) && !cr.Spec.IsRdma {
return false, fmt.Errorf("'linkType: ib or IB' requires 'isRdma: true'; Set 'isRdma' to (bool)'true'")
}

// vdpa: deviceType must be set to 'netdevice'
if cr.Spec.DeviceType != consts.DeviceTypeNetDevice && (cr.Spec.VdpaType == consts.VdpaTypeVirtio || cr.Spec.VdpaType == consts.VdpaTypeVhost) {
return false, fmt.Errorf("'deviceType: %s' conflicts with '%s'; Set 'deviceType' to (string)'netdevice' Or Remove 'vdpaType'", cr.Spec.DeviceType, cr.Spec.VdpaType)
Expand Down

0 comments on commit 8835035

Please sign in to comment.