1
0
mirror of https://github.com/rancher/rke.git synced 2025-10-20 18:40:43 +00:00

Add per node kubelet server certificate

This commit is contained in:
Sebastiaan van Steenis
2019-07-24 22:25:14 +02:00
committed by Alena Prokharchyk
parent fd237d9eef
commit b860e634db
12 changed files with 210 additions and 113 deletions

View File

@@ -425,7 +425,7 @@ func DownloadEtcdSnapshotFromS3(ctx context.Context, etcdHost *hosts.Host, prsMa
func RestoreEtcdSnapshot(ctx context.Context, etcdHost *hosts.Host, prsMap map[string]v3.PrivateRegistry, etcdRestoreImage, snapshotName, initCluster string, es v3.ETCDService) error {
log.Infof(ctx, "[etcd] Restoring [%s] snapshot on etcd host [%s]", snapshotName, etcdHost.Address)
nodeName := pki.GetEtcdCrtName(etcdHost.InternalAddress)
nodeName := pki.GetCrtNameForAddress(etcdHost.InternalAddress, pki.EtcdCertName)
snapshotPath := fmt.Sprintf("%s%s", EtcdSnapshotPath, snapshotName)
// make sure that restore path is empty otherwise etcd restore will fail