Skip to content

Commit

Permalink
clustermesh: fix remote clusters configuration reset upon deactivation
Browse files Browse the repository at this point in the history
The blamed commit explicitly reset the list of remote clusters upon
clustermesh deactivation. However, it did so setting the corresponding
setting to nil, which in Cilium v1.16 triggers an error due to not
matching the schema configured. Let's address this by configuring an
empty array instead.

Fixes: b148800 ("clustermesh: reset remote clusters configuration upon disconnection")
Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
  • Loading branch information
giorio94 authored and michi-covalent committed Jul 11, 2024
1 parent b723c59 commit 93c0987
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clustermesh/clustermesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -1527,13 +1527,18 @@ func DisableWithHelm(ctx context.Context, k8sClient *k8s.Client, params Paramete
helmStrValues := []string{
"clustermesh.useAPIServer=false",
"clustermesh.config.enabled=false",
"clustermesh.config.clusters=null",
"externalWorkloads.enabled=false",
}
vals, err := helm.ParseVals(helmStrValues)
if err != nil {
return err
}

err = unstructured.SetNestedSlice(vals, []interface{}{}, "clustermesh", "config", "clusters")
if err != nil {
return err
}

upgradeParams := helm.UpgradeParameters{
Namespace: params.Namespace,
Name: params.HelmReleaseName,
Expand Down

0 comments on commit 93c0987

Please sign in to comment.