From f80a66903bc6beaf129b6efb794065b028db7a32 Mon Sep 17 00:00:00 2001 From: Justin SB Date: Sun, 24 Apr 2022 11:15:08 -0400 Subject: [PATCH 1/2] WIP: Need to publish IPv4 DNS records On GCE the Node's IPv6 record is not published, so we need the IPv4 record. --- upup/pkg/fi/cloudup/template_functions.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upup/pkg/fi/cloudup/template_functions.go b/upup/pkg/fi/cloudup/template_functions.go index d125e918166a3..66254fe196982 100644 --- a/upup/pkg/fi/cloudup/template_functions.go +++ b/upup/pkg/fi/cloudup/template_functions.go @@ -633,6 +633,10 @@ func (tf *TemplateFunctions) DNSControllerArgv() ([]string, error) { if cluster.Spec.IsIPv6Only() { argv = append(argv, "--internal-ipv6") + // We need IPv4 on GCE, because we aren't publishing IPv6 Node IPs on GCE yet + if cluster.Spec.GetCloudProvider() == kops.CloudProviderGCE { + argv = append(argv, "--internal-ipv4") + } } else { argv = append(argv, "--internal-ipv4") } From 0096451a83882aa43b85b8802d81164f0de58485 Mon Sep 17 00:00:00 2001 From: justinsb Date: Mon, 18 Sep 2023 11:02:18 -0400 Subject: [PATCH 2/2] Cleanup a few places where we used Warningf with %w Fixing up a few places where we used the wrong marker. --- cmd/kops-controller/controllers/gceipam.go | 2 +- pkg/applylib/mocks/mockkubeapiserver/apiserver.go | 2 +- upup/pkg/fi/vfs_castore.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/kops-controller/controllers/gceipam.go b/cmd/kops-controller/controllers/gceipam.go index 04b18c9ed8b5f..a3f8a3b2bcded 100644 --- a/cmd/kops-controller/controllers/gceipam.go +++ b/cmd/kops-controller/controllers/gceipam.go @@ -78,7 +78,7 @@ func (r *GCEIPAMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct node := &corev1.Node{} if err := r.client.Get(ctx, req.NamespacedName, node); err != nil { - klog.Warningf("unable to fetch node %s: %w", node.Name, err) + klog.Warningf("unable to fetch node %s: %v", node.Name, err) if apierrors.IsNotFound(err) { // we'll ignore not-found errors, since they can't be fixed by an immediate // requeue (we'll need to wait for a new notification), and we can get them diff --git a/pkg/applylib/mocks/mockkubeapiserver/apiserver.go b/pkg/applylib/mocks/mockkubeapiserver/apiserver.go index 25517af7ce7f4..cc919fdfa14c6 100644 --- a/pkg/applylib/mocks/mockkubeapiserver/apiserver.go +++ b/pkg/applylib/mocks/mockkubeapiserver/apiserver.go @@ -250,7 +250,7 @@ func (r *baseRequest) writeResponse(obj interface{}) error { if _, err := r.w.Write(b); err != nil { // Too late to send error response - klog.Warningf("error writing http response: %w", err) + klog.Warningf("error writing http response: %v", err) return nil } return nil diff --git a/upup/pkg/fi/vfs_castore.go b/upup/pkg/fi/vfs_castore.go index d5de7160b3a79..a1dc819caab4d 100644 --- a/upup/pkg/fi/vfs_castore.go +++ b/upup/pkg/fi/vfs_castore.go @@ -182,7 +182,7 @@ func (c *VFSCAStore) ListKeysets() (map[string]*Keyset, error) { name := tokens[0] loadedKeyset, err := c.loadKeyset(ctx, baseDir.Join(name)) if err != nil { - klog.Warningf("ignoring keyset %q: %w", name, err) + klog.Warningf("ignoring keyset %q: %v", name, err) continue }