Merge pull request #3506 from calvin0327/fixed-karmada-operator-certs
karmada operator: fixed adding altName to certification
This commit is contained in:
commit
e40912f582
|
@ -459,17 +459,18 @@ func apiServerAltNamesMutator(cfg *AltNamesMutatorConfig) (*certutil.AltNames, e
|
|||
"kubernetes.default.svc",
|
||||
fmt.Sprintf("*.%s.svc.cluster.local", cfg.Namespace),
|
||||
fmt.Sprintf("*.%s.svc", cfg.Namespace),
|
||||
cfg.ControlplaneAddress,
|
||||
},
|
||||
IPs: []net.IP{
|
||||
net.IPv4(127, 0, 0, 1),
|
||||
net.ParseIP(cfg.ControlplaneAddress),
|
||||
},
|
||||
}
|
||||
|
||||
if len(cfg.Components.KarmadaAPIServer.CertSANs) > 0 {
|
||||
appendSANsToAltNames(altNames, cfg.Components.KarmadaAPIServer.CertSANs)
|
||||
}
|
||||
if len(cfg.ControlplaneAddress) > 0 {
|
||||
appendSANsToAltNames(altNames, []string{cfg.ControlplaneAddress})
|
||||
}
|
||||
|
||||
return altNames, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue