Skip to content

Commit

Permalink
Fix incorrect condition to enable CAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
zerospiel committed Sep 25, 2024
1 parent bcb3a7c commit f6f5165
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions internal/controller/management_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,13 @@ func (r *ManagementReconciler) enableAdditionalComponents(ctx context.Context, m

// Enable HMC capi operator only if it was not explicitly disabled in the config to
// support installation with existing cluster api operator
if v, ok := capiOperatorValues["enabled"].(bool); ok && v {
l.Info("Enabling cluster API operator")
capiOperatorValues["enabled"] = true
{
enabledV, enabledExists := capiOperatorValues["enabled"]
enabledValue, castedOk := enabledV.(bool)
if !enabledExists || !castedOk || enabledValue {
l.Info("Enabling cluster API operator")
capiOperatorValues["enabled"] = true
}
}
config["cluster-api-operator"] = capiOperatorValues

Expand Down

0 comments on commit f6f5165

Please sign in to comment.