mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
kubeadm: fix the bug that 'kubeadm certs generate-csr' command does not remove duplicated SANs
This commit is contained in:
parent
e1c16d24a1
commit
dcf959c782
@ -563,6 +563,8 @@ func CertificateRequestFromFile(file string) (*x509.CertificateRequest, error) {
|
||||
|
||||
// NewCSR creates a new CSR
|
||||
func NewCSR(cfg CertConfig, key crypto.Signer) (*x509.CertificateRequest, error) {
|
||||
RemoveDuplicateAltNames(&cfg.AltNames)
|
||||
|
||||
template := &x509.CertificateRequest{
|
||||
Subject: pkix.Name{
|
||||
CommonName: cfg.CommonName,
|
||||
|
Loading…
Reference in New Issue
Block a user