Merge pull request #36068 from sttts/sttts-old-self-signed-cn

Automatic merge from submit-queue

Restore old apiserver cert CN

This patch got lost during rebase of https://github.com/kubernetes/kubernetes/pull/35109:

- set `host@<unix-timestamp>` as CN in self-signed apiserver certs
- skip non-domain CN in getNamedCertificateMap
This commit is contained in:
Kubernetes Submit Queue
2016-11-07 00:37:12 -08:00
committed by GitHub
3 changed files with 7 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS
template := x509.Certificate{
SerialNumber: big.NewInt(1),
Subject: pkix.Name{
CommonName: host,
CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()),
},
NotBefore: time.Now(),
NotAfter: time.Now().Add(time.Hour * 24 * 365),