Skip to content

Commit

Permalink
rollback partially
Browse files Browse the repository at this point in the history
  • Loading branch information
punkerpunker committed Jan 31, 2025
1 parent 8b044a5 commit 7c27535
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 2 additions & 4 deletions api/v1/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ const (
SriovCniStateOn = "on"
SriovCniIpam = "\"ipam\""
SriovCniIpamEmpty = SriovCniIpam + ":{}"

CniType = "ib-sriov"
)

const invalidVfIndex = -1
Expand All @@ -52,6 +50,7 @@ var log = logf.Log.WithName("sriovnetwork")
// NicIDMap contains supported mapping of IDs with each in the format of:
// Vendor ID, Physical Function Device ID, Virtual Function Device ID
var NicIDMap = []string{}

var InitialState SriovNetworkNodeState

// NetFilterType Represents the NetFilter tags to be used
Expand Down Expand Up @@ -696,7 +695,7 @@ func (cr *SriovIBNetwork) RenderNetAttDef() (*uns.Unstructured, error) {

// render RawCNIConfig manifests
data := render.MakeRenderData()
data.Data["CniType"] = CniType
data.Data["CniType"] = "ib-sriov"
data.Data["SriovNetworkName"] = cr.Name
if cr.Spec.NetworkNamespace == "" {
data.Data["SriovNetworkNamespace"] = cr.Namespace
Expand Down Expand Up @@ -764,7 +763,6 @@ func (cr *SriovNetwork) RenderNetAttDef() (*uns.Unstructured, error) {

// render RawCNIConfig manifests
data := render.MakeRenderData()

data.Data["CniType"] = "sriov"
data.Data["SriovNetworkName"] = cr.Name
if cr.Spec.NetworkNamespace == "" {
Expand Down
3 changes: 0 additions & 3 deletions controllers/generic_network_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,8 @@ func (r *genericNetworkReconciler) Reconcile(ctx context.Context, req ctrl.Reque
}
return reconcile.Result{}, err
}

raw, err := instance.RenderNetAttDef()

if err != nil {
reqLogger.Error(err, "Failed to render NetworkAttachmentDefinition")
return reconcile.Result{}, err
}
netAttDef := &netattdefv1.NetworkAttachmentDefinition{}
Expand Down

0 comments on commit 7c27535

Please sign in to comment.