From 3b1086a7ab091728202b2362cc6d30b96955a9a6 Mon Sep 17 00:00:00 2001 From: kaiyou <dev@kaiyou.fr> Date: Tue, 20 Dec 2022 17:10:17 +0100 Subject: [PATCH] Fix many trivial errors in logs --- cmd/hepto/root.go | 2 +- pkg/cluster/cluster.go | 4 ++-- pkg/cluster/kubeconfig.go | 9 ++------- pkg/cluster/services.go | 9 +++++---- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/cmd/hepto/root.go b/cmd/hepto/root.go index c29c483..c2d7c26 100644 --- a/cmd/hepto/root.go +++ b/cmd/hepto/root.go @@ -64,7 +64,7 @@ func waitForIP() net.IP { config.Logger.Info("connecting outbound to guess IP", "target", target) conn, err := net.Dial("udp", target) if err != nil { - config.Logger.Error(err, "could not connect") + config.Logger.Info("could not connect") continue } localAddr := conn.LocalAddr().(*net.UDPAddr).IP diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index f294945..4c0e166 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -35,9 +35,9 @@ func RequiredMounts(settings *ClusterSettings, node *NodeSettings) []string { if node.Role == Master { mounts = append(mounts, etcdPath) } - // Persist overlayfs and containerd data if this is a node + // Persist containerd data if this is a node if node.Role == Node { - mounts = append(mounts, overlayPath, containerdPath) + mounts = append(mounts, containerdPath) } return mounts } diff --git a/pkg/cluster/kubeconfig.go b/pkg/cluster/kubeconfig.go index e4d7530..997f490 100644 --- a/pkg/cluster/kubeconfig.go +++ b/pkg/cluster/kubeconfig.go @@ -111,16 +111,11 @@ version = 2 [grpc] address = "{{.Socket}}" - -[plugins."io.containerd.snapshotter.v1.overlayfs"] - root_path = "{{.OverlayDir}}" - upperdir_label = false ` type ContainerdConfig struct { - RootDir string - OverlayDir string - Socket string + RootDir string + Socket string } func (ContainerdConfig) Template() string { diff --git a/pkg/cluster/services.go b/pkg/cluster/services.go index 02ed70e..4b8665a 100644 --- a/pkg/cluster/services.go +++ b/pkg/cluster/services.go @@ -16,7 +16,6 @@ const configPath = "/config" const etcdPath = "/etcd" const binPath = "/bin" const containerdPath = "/containerd" -const overlayPath = "/overlay" const imagePath = "/images" func (c *Cluster) watchService(ctx context.Context) { @@ -126,6 +125,9 @@ func (c *Cluster) startK8sMaster() { "--tls-private-key-file", c.masterCerts.ControllersTLS.KeyPath(), "--service-account-private-key-file", c.masterCerts.APITokens.KeyPath(), "--root-ca-file", c.pki.TLS.CertPath(), + // This is better than no declared cloud provider, since it does disable + // unnecessary cloud controllers + "--cloud-provider", "external", "--use-service-account-credentials", }) if err != nil { @@ -171,9 +173,8 @@ func (c *Cluster) startK8sNode(masterIP net.IP) { wrappers.SetK8sLogger(c.settings.Logger) // Containerd containerdConfig := ContainerdConfig{ - RootDir: containerdPath, - OverlayDir: overlayPath, - Socket: "/run/containerd/containerd.sock", + RootDir: containerdPath, + Socket: "/run/containerd/containerd.sock", } containerdConfigPath := path.Join(configPath, "containerd.toml") c.WriteConfig(containerdConfig, containerdConfigPath) -- GitLab