Skip to content

Commit 3d29255

Browse files
committed
Render SriovNetworkNodeState before Device Plugin ConfigMap
1 parent 94a376b commit 3d29255

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

controllers/sriovnetworknodepolicy_controller.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ func (r *SriovNetworkNodePolicyReconciler) Reconcile(ctx context.Context, req ct
144144
// Sort the policies with priority, higher priority ones is applied later
145145
sort.Sort(sriovnetworkv1.ByPriority(policyList.Items))
146146

147+
// Sync SriovNetworkNodeState objects
148+
if err = r.syncAllSriovNetworkNodeStates(defaultPolicy, policyList, nodeList); err != nil {
149+
return reconcile.Result{}, err
150+
}
151+
147152
if os.Getenv("SRIOV_DEVICE_PLUGIN_IMAGE") != "" {
148153
// Sync Sriov device plugin ConfigMap object
149154
if err = r.syncDevicePluginConfigMap(policyList, nodeList); err != nil {
@@ -154,10 +159,7 @@ func (r *SriovNetworkNodePolicyReconciler) Reconcile(ctx context.Context, req ct
154159
return reconcile.Result{}, err
155160
}
156161
}
157-
// Sync SriovNetworkNodeState objects
158-
if err = r.syncAllSriovNetworkNodeStates(defaultPolicy, policyList, nodeList); err != nil {
159-
return reconcile.Result{}, err
160-
}
162+
161163

162164
// All was successful. Request that this be re-triggered after ResyncPeriod,
163165
// so we can reconcile state again.

0 commit comments

Comments
 (0)