From 7cbb92b755fdbf8e348dbe7c1e1319d81c6a0655 Mon Sep 17 00:00:00 2001 From: Marco Vito Moscaritolo Date: Sun, 7 Oct 2018 10:42:15 +0200 Subject: [PATCH] fix issue on wrong DEB packaging on k8s This is a temporary fix that allow to build cluster until the issue https://github.com/kubernetes/kubernetes/issues/69489 will fixed --- pkg/clustermanager/provision_node.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkg/clustermanager/provision_node.go b/pkg/clustermanager/provision_node.go index 39f245f7..2cd43999 100644 --- a/pkg/clustermanager/provision_node.go +++ b/pkg/clustermanager/provision_node.go @@ -147,6 +147,19 @@ Pin-Priority: 1000 return err } + // k8s preferences + // This will fix issue on package dependencies as reported in + // https://github.com/kubernetes/kubernetes/issues/69489 + aptPreferencesKubernetes := ` +Package: kubernetes-cni +Pin: version 0.6.0-00* +Pin-Priority: 900 + ` + err = provisioner.communicator.WriteFile(provisioner.node, "/etc/apt/preferences.d/k8s.pref", aptPreferencesKubernetes, false) + if err != nil { + return err + } + _, err = provisioner.communicator.RunCmd(provisioner.node, "curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -") if err != nil { return err