From 95b4ac4dbd5e8560abf1a376e5875ba8ff3fe668 Mon Sep 17 00:00:00 2001 From: Abu Kashem Date: Mon, 24 Jan 2022 10:24:30 -0500 Subject: [PATCH] apf: create suggested pl before flowschema --- pkg/registry/flowcontrol/rest/storage_flowcontrol.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/registry/flowcontrol/rest/storage_flowcontrol.go b/pkg/registry/flowcontrol/rest/storage_flowcontrol.go index 55963684265..7d2076294f6 100644 --- a/pkg/registry/flowcontrol/rest/storage_flowcontrol.go +++ b/pkg/registry/flowcontrol/rest/storage_flowcontrol.go @@ -196,13 +196,13 @@ func ensure(clientset flowcontrolclient.FlowcontrolV1beta2Interface, fsLister fl } func ensureSuggestedConfiguration(clientset flowcontrolclient.FlowcontrolV1beta2Interface, fsLister flowcontrollisters.FlowSchemaLister, plcLister flowcontrollisters.PriorityLevelConfigurationLister) error { - fsEnsurer := ensurer.NewSuggestedFlowSchemaEnsurer(clientset.FlowSchemas(), fsLister) - if err := fsEnsurer.Ensure(flowcontrolbootstrap.SuggestedFlowSchemas); err != nil { + plEnsurer := ensurer.NewSuggestedPriorityLevelEnsurerEnsurer(clientset.PriorityLevelConfigurations(), plcLister) + if err := plEnsurer.Ensure(flowcontrolbootstrap.SuggestedPriorityLevelConfigurations); err != nil { return err } - plEnsurer := ensurer.NewSuggestedPriorityLevelEnsurerEnsurer(clientset.PriorityLevelConfigurations(), plcLister) - return plEnsurer.Ensure(flowcontrolbootstrap.SuggestedPriorityLevelConfigurations) + fsEnsurer := ensurer.NewSuggestedFlowSchemaEnsurer(clientset.FlowSchemas(), fsLister) + return fsEnsurer.Ensure(flowcontrolbootstrap.SuggestedFlowSchemas) } func ensureMandatoryConfiguration(clientset flowcontrolclient.FlowcontrolV1beta2Interface, fsLister flowcontrollisters.FlowSchemaLister, plcLister flowcontrollisters.PriorityLevelConfigurationLister) error {