@@ -188,7 +188,7 @@ func ensure(clientset flowcontrolclient.FlowcontrolV1beta2Interface, fsLister fl
188
188
return fmt .Errorf ("failed ensuring mandatory settings - %w" , err )
189
189
}
190
190
191
- if err := removeConfiguration (clientset , fsLister , plcLister ); err != nil {
191
+ if err := removeDanglingBootstrapConfiguration (clientset , fsLister , plcLister ); err != nil {
192
192
return fmt .Errorf ("failed to delete removed settings - %w" , err )
193
193
}
194
194
@@ -215,17 +215,17 @@ func ensureMandatoryConfiguration(clientset flowcontrolclient.FlowcontrolV1beta2
215
215
return plEnsurer .Ensure (flowcontrolbootstrap .MandatoryPriorityLevelConfigurations )
216
216
}
217
217
218
- func removeConfiguration (clientset flowcontrolclient.FlowcontrolV1beta2Interface , fsLister flowcontrollisters.FlowSchemaLister , plcLister flowcontrollisters.PriorityLevelConfigurationLister ) error {
219
- if err := removeFlowSchema (clientset .FlowSchemas (), fsLister ); err != nil {
218
+ func removeDanglingBootstrapConfiguration (clientset flowcontrolclient.FlowcontrolV1beta2Interface , fsLister flowcontrollisters.FlowSchemaLister , plcLister flowcontrollisters.PriorityLevelConfigurationLister ) error {
219
+ if err := removeDanglingBootstrapFlowSchema (clientset .FlowSchemas (), fsLister ); err != nil {
220
220
return err
221
221
}
222
222
223
- return removePriorityLevel (clientset .PriorityLevelConfigurations (), plcLister )
223
+ return removeDanglingBootstrapPriorityLevel (clientset .PriorityLevelConfigurations (), plcLister )
224
224
}
225
225
226
- func removeFlowSchema (client flowcontrolclient.FlowSchemaInterface , lister flowcontrollisters.FlowSchemaLister ) error {
226
+ func removeDanglingBootstrapFlowSchema (client flowcontrolclient.FlowSchemaInterface , lister flowcontrollisters.FlowSchemaLister ) error {
227
227
bootstrap := append (flowcontrolbootstrap .MandatoryFlowSchemas , flowcontrolbootstrap .SuggestedFlowSchemas ... )
228
- candidates , err := ensurer .GetFlowSchemaRemoveCandidate (lister , bootstrap )
228
+ candidates , err := ensurer .GetFlowSchemaRemoveCandidates (lister , bootstrap )
229
229
if err != nil {
230
230
return err
231
231
}
@@ -234,12 +234,12 @@ func removeFlowSchema(client flowcontrolclient.FlowSchemaInterface, lister flowc
234
234
}
235
235
236
236
fsRemover := ensurer .NewFlowSchemaRemover (client , lister )
237
- return fsRemover .Remove (candidates )
237
+ return fsRemover .RemoveAutoUpdateEnabledObjects (candidates )
238
238
}
239
239
240
- func removePriorityLevel (client flowcontrolclient.PriorityLevelConfigurationInterface , lister flowcontrollisters.PriorityLevelConfigurationLister ) error {
240
+ func removeDanglingBootstrapPriorityLevel (client flowcontrolclient.PriorityLevelConfigurationInterface , lister flowcontrollisters.PriorityLevelConfigurationLister ) error {
241
241
bootstrap := append (flowcontrolbootstrap .MandatoryPriorityLevelConfigurations , flowcontrolbootstrap .SuggestedPriorityLevelConfigurations ... )
242
- candidates , err := ensurer .GetPriorityLevelRemoveCandidate (lister , bootstrap )
242
+ candidates , err := ensurer .GetPriorityLevelRemoveCandidates (lister , bootstrap )
243
243
if err != nil {
244
244
return err
245
245
}
@@ -248,7 +248,7 @@ func removePriorityLevel(client flowcontrolclient.PriorityLevelConfigurationInte
248
248
}
249
249
250
250
plRemover := ensurer .NewPriorityLevelRemover (client , lister )
251
- return plRemover .Remove (candidates )
251
+ return plRemover .RemoveAutoUpdateEnabledObjects (candidates )
252
252
}
253
253
254
254
// contextFromChannelAndMaxWaitDuration returns a Context that is bound to the
0 commit comments