From c78afc695b903405f318082521e6b9b7596a7a77 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 8 Dec 2021 20:50:23 +0200 Subject: [PATCH] kubeadm: print the CA of kubeconfig files in "check expiration" Apply a small fix to ensure the kubeconfig files that kubeadm manages have a CA when printed in the table of the "check expiration" command. "CAName" is the field used for that. In practice kubeconfig files can contain multiple credentials from different CAs, but this is not supported by kubeadm and there is a single cluster CA that signs the single client cert/key in kubeadm managed kubeconfigs. --- cmd/kubeadm/app/phases/certs/renewal/manager.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/kubeadm/app/phases/certs/renewal/manager.go b/cmd/kubeadm/app/phases/certs/renewal/manager.go index 9f5e0d158f9..764bcb01a80 100644 --- a/cmd/kubeadm/app/phases/certs/renewal/manager.go +++ b/cmd/kubeadm/app/phases/certs/renewal/manager.go @@ -166,6 +166,7 @@ func NewManager(cfg *kubeadmapi.ClusterConfiguration, kubernetesDir string) (*Ma LongName: kubeConfig.longName, FileName: kubeConfig.fileName, CABaseName: kubeadmconstants.CACertAndKeyBaseName, // all certificates in kubeConfig files are signed by the Kubernetes CA + CAName: kubeadmconstants.CACertAndKeyBaseName, readwriter: kubeConfigReadWriter, } }