Skip to content

Commit 3fe6acd

Browse files
committed
chore: rabbit
Signed-off-by: Artur Shad Nik <[email protected]>
1 parent 0678274 commit 3fe6acd

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

fleetconfig-controller/internal/controller/v1beta1/addon.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -352,14 +352,7 @@ func handleSpokeAddons(ctx context.Context, addonC *addonapi.Clientset, spoke *v
352352
// do disables first, then enables/updates
353353
err = handleAddonDisable(ctx, spoke, addonsToDisable)
354354
if err != nil {
355-
// Return current enabled addons minus disabled ones
356-
currentEnabled := make([]string, 0)
357-
for _, name := range enabledAddons {
358-
if !slices.Contains(addonsToDisable, name) {
359-
currentEnabled = append(currentEnabled, name)
360-
}
361-
}
362-
return currentEnabled, err
355+
return enabledAddons, err
363356
}
364357

365358
// Remove disabled addons from enabled list

fleetconfig-controller/internal/controller/v1beta1/spoke_handler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,18 @@ func (r *SpokeReconciler) configureFCCAddOn(spoke *v1beta1.Spoke) {
370370
return
371371
}
372372

373-
fccIdx := 0
373+
fccIdx := -1
374374
for i, addon := range spoke.Spec.AddOns {
375375
if addon.ConfigName == v1beta1.FCCAddOnName {
376376
fccIdx = i
377377
break
378378
}
379379
}
380380

381+
if fccIdx == -1 {
382+
return
383+
}
384+
381385
// Merge FCC-specific config with any existing config
382386
if spoke.Spec.AddOns[fccIdx].DeploymentConfig == nil {
383387
spoke.Spec.AddOns[fccIdx].DeploymentConfig = &addonv1alpha1.AddOnDeploymentConfigSpec{}

0 commit comments

Comments
 (0)