1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-12 13:18:47 +00:00

Run rebuild cluster certs from clusterup

This commit is contained in:
galal-hussein
2018-12-21 00:01:42 +02:00
committed by Alena Prokharchyk
parent 918b4ad669
commit 3c6c7f1b7b
3 changed files with 9 additions and 4 deletions

View File

@@ -177,7 +177,8 @@ func RotateRKECertificates(ctx context.Context, c *Cluster, flags ExternalFlags,
}
}
}
if len(rotateFlags.Services) == 0 {
// to handle kontainer engine sending empty string for services
if len(rotateFlags.Services) == 0 || (len(rotateFlags.Services) == 1 && rotateFlags.Services[0] == "") {
// do not rotate service account token
if c.Certificates[pki.ServiceAccountTokenKeyName].Key != nil {
serviceAccountTokenKey = string(cert.EncodePrivateKeyPEM(c.Certificates[pki.ServiceAccountTokenKeyName].Key))