From d77343be3a92cb2b85d1ff56eb5f2744732e8130 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Tue, 15 Jun 2021 18:25:10 -0700 Subject: [PATCH] Workaround systemd 248 path units not working reliably * On FCOS 34 / systemd 248, `kubelet.path` won't activate (stuck waiting) when `/etc/kubernetes/kubeconfig` exists, even with manual prodding of the file. The root cause isn't known, but a workaround is to delay `/etc/kubernetes` directory creation or to touch the directory later * Fix DigitalOcean worker node kubelet.service being enabled immediately. On bare-metal and DigitalOcean, the kubeconfig should activate the Kubelet, so it doesn't crashloop needlessly (nice to have, not required) --- bare-metal/fedora-coreos/kubernetes/ssh.tf | 2 ++ digital-ocean/fedora-coreos/kubernetes/ssh.tf | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bare-metal/fedora-coreos/kubernetes/ssh.tf b/bare-metal/fedora-coreos/kubernetes/ssh.tf index 092794fd..98c09699 100644 --- a/bare-metal/fedora-coreos/kubernetes/ssh.tf +++ b/bare-metal/fedora-coreos/kubernetes/ssh.tf @@ -39,6 +39,7 @@ resource "null_resource" "copy-controller-secrets" { provisioner "remote-exec" { inline = [ "sudo mv $HOME/kubeconfig /etc/kubernetes/kubeconfig", + "sudo touch /etc/kubernetes", "sudo /opt/bootstrap/layout", ] } @@ -70,6 +71,7 @@ resource "null_resource" "copy-worker-secrets" { provisioner "remote-exec" { inline = [ "sudo mv $HOME/kubeconfig /etc/kubernetes/kubeconfig", + "sudo touch /etc/kubernetes", ] } } diff --git a/digital-ocean/fedora-coreos/kubernetes/ssh.tf b/digital-ocean/fedora-coreos/kubernetes/ssh.tf index f4888fe0..84bfc621 100644 --- a/digital-ocean/fedora-coreos/kubernetes/ssh.tf +++ b/digital-ocean/fedora-coreos/kubernetes/ssh.tf @@ -36,6 +36,7 @@ resource "null_resource" "copy-controller-secrets" { provisioner "remote-exec" { inline = [ "sudo mv $HOME/kubeconfig /etc/kubernetes/kubeconfig", + "sudo touch /etc/kubernetes", "sudo /opt/bootstrap/layout", ] } @@ -60,6 +61,7 @@ resource "null_resource" "copy-worker-secrets" { provisioner "remote-exec" { inline = [ "sudo mv $HOME/kubeconfig /etc/kubernetes/kubeconfig", + "sudo touch /etc/kubernetes", ] } } @@ -84,4 +86,3 @@ resource "null_resource" "bootstrap" { ] } } -