Skip to content

Commit

Permalink
Merge pull request K0rdent#390 from zerospiel/incorrect_capi_enable
Browse files Browse the repository at this point in the history
Fix incorrect condition to enable CAPI
  • Loading branch information
eromanova authored Sep 25, 2024
2 parents bcb3a7c + f6f5165 commit c81b512
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 c81b512

Please sign in to comment.