Skip to content

Commit

Permalink
added addon check before addon components (#1150)
Browse files Browse the repository at this point in the history
Signed-off-by: dislbenn <[email protected]>
  • Loading branch information
dislbenn authored Dec 18, 2024
1 parent b815aa2 commit c081a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/backplaneconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func (r *MultiClusterEngineReconciler) ensureToggleableComponents(ctx context.Co
errs := map[string]error{}
requeue := false

if backplaneConfig.Enabled(backplanev1.ManagedServiceAccount) {
if backplaneConfig.Enabled(backplanev1.ManagedServiceAccount) && foundation.CanInstallAddons(ctx, r.Client) {
result, err := r.ensureManagedServiceAccount(ctx, backplaneConfig)
if result != (ctrl.Result{}) {
requeue = true
Expand Down Expand Up @@ -974,7 +974,7 @@ func (r *MultiClusterEngineReconciler) ensureToggleableComponents(ctx context.Co
}
}

if backplaneConfig.Enabled(backplanev1.HyperShift) {
if backplaneConfig.Enabled(backplanev1.HyperShift) && foundation.CanInstallAddons(ctx, r.Client) {
result, err := r.ensureHyperShift(ctx, backplaneConfig)
if result != (ctrl.Result{}) {
requeue = true
Expand Down Expand Up @@ -1133,7 +1133,7 @@ func (r *MultiClusterEngineReconciler) ensureToggleableComponents(ctx context.Co
}
}

if backplaneConfig.Enabled(backplanev1.ClusterProxyAddon) {
if backplaneConfig.Enabled(backplanev1.ClusterProxyAddon) && foundation.CanInstallAddons(ctx, r.Client) {
result, err = r.ensureClusterProxyAddon(ctx, backplaneConfig)
if result != (ctrl.Result{}) {
requeue = true
Expand Down

0 comments on commit c081a5b

Please sign in to comment.