Skip to content

Commit 762ce83

Browse files
authored
Fix federation status check when cluster has no context (#430)
1 parent b4b63dc commit 762ce83

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/cofidectl/cmd/federation/federation.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ func checkFederationStatus(ctx context.Context, ds datasource.DataSource, kubeCo
159159
}
160160
return "Unknown", err.Error(), nil
161161
}
162+
if cluster.GetKubernetesContext() == "" {
163+
return "Unknown", fmt.Sprintf("no kubernetes context for cluster %q in trust zone %q", cluster.GetName(), tz.GetName()), nil
164+
}
162165

163166
if deployed, err := helm.IsClusterDeployed(ctx, cluster, kubeConfig); err != nil {
164167
return "", "", err

0 commit comments

Comments
 (0)