diff --git a/cmd/eksctl-anywhere/cmd/upgradeplan.go b/cmd/eksctl-anywhere/cmd/upgradeplan.go index 1170c9de74b9..0b901c7938e2 100644 --- a/cmd/eksctl-anywhere/cmd/upgradeplan.go +++ b/cmd/eksctl-anywhere/cmd/upgradeplan.go @@ -82,8 +82,14 @@ func (uc *upgradeClusterOptions) upgradePlanCluster(ctx context.Context) error { } componentChangeDiffs := eksaupgrader.EksaChangeDiff(currentSpec, newClusterSpec) - componentChangeDiffs.Append(fluxupgrader.FluxChangeDiff(currentSpec, newClusterSpec)) + if currentSpec.Cluster.Spec.GitOpsRef != nil || newClusterSpec.Cluster.Spec.GitOpsRef != nil { + componentChangeDiffs.Append(fluxupgrader.FluxChangeDiff(currentSpec, newClusterSpec)) + } + if componentChangeDiffs == nil { + fmt.Println("All the components are up to date with the latest versions") + return nil + } w := tabwriter.NewWriter(os.Stdout, 10, 4, 3, ' ', 0) fmt.Fprintln(w, "NAME\tCURRENT VERSION\tNEXT VERSION") for i := range componentChangeDiffs.ComponentReports {