From a663d8bcd443bd55b9b674c01a1e8707f9692fd8 Mon Sep 17 00:00:00 2001 From: justinsb Date: Mon, 13 Jan 2025 11:54:46 -0500 Subject: [PATCH] toolbox dump: include full instance details on GCE --- pkg/model/components/kubecontrollermanager.go | 3 ++- pkg/resources/gce/dump.go | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/model/components/kubecontrollermanager.go b/pkg/model/components/kubecontrollermanager.go index fb7ade2835153..82b039f216cb2 100644 --- a/pkg/model/components/kubecontrollermanager.go +++ b/pkg/model/components/kubecontrollermanager.go @@ -25,6 +25,7 @@ import ( "k8s.io/klog/v2" "k8s.io/kops/pkg/apis/kops" "k8s.io/kops/upup/pkg/fi" + "k8s.io/kops/upup/pkg/fi/cloudup/gce" "k8s.io/kops/upup/pkg/fi/loader" "k8s.io/kops/upup/pkg/fi/utils" ) @@ -110,7 +111,7 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o *kops.Cluster) erro networking := &clusterSpec.Networking if networking.Kubenet != nil { kcm.ConfigureCloudRoutes = fi.PtrTo(true) - } else if networking.GCP != nil { + } else if gce.UsesIPAliases(o) { kcm.ConfigureCloudRoutes = fi.PtrTo(false) if kcm.CloudProvider == "external" { // kcm should not allocate node cidrs with the CloudAllocator if we're using the external CCM diff --git a/pkg/resources/gce/dump.go b/pkg/resources/gce/dump.go index 2977dcc224fe1..ca42a803c5877 100644 --- a/pkg/resources/gce/dump.go +++ b/pkg/resources/gce/dump.go @@ -79,8 +79,7 @@ func DumpManagedInstance(op *resources.DumpOperation, r *resources.Resource) err op.Dump.Instances = append(op.Dump.Instances, i) - // Unclear if we should include the instance details in the dump - assume YAGNI until someone needs it - // dump.Resources = append(dump.Resources, instanceDetails) + op.Dump.Resources = append(op.Dump.Resources, instanceDetails) return nil }