mirror of
https://github.com/outbackdingo/kamaji.git
synced 2026-01-27 10:19:29 +00:00
fix: check cert names and ips including tcp address (#758)
Signed-off-by: Dario Tranchitella <dario@tranchitella.eu>
This commit is contained in:
committed by
GitHub
parent
05aad8ce56
commit
8b22f22bd3
@@ -136,9 +136,9 @@ func (r *APIServerCertificate) mutate(ctx context.Context, tenantControlPlane *k
|
||||
|
||||
commonNames := config.InitConfiguration.APIServer.CertSANs
|
||||
|
||||
if tenantControlPlane.Spec.ControlPlane.Ingress != nil {
|
||||
address, _ := utilities.GetControlPlaneAddressAndPortFromHostname(tenantControlPlane.Spec.ControlPlane.Ingress.Hostname, 6443)
|
||||
commonNames = append(commonNames, address)
|
||||
addr, _, aErr := tenantControlPlane.AssignedControlPlaneAddress()
|
||||
if aErr == nil {
|
||||
commonNames = append(commonNames, addr)
|
||||
}
|
||||
|
||||
dnsNamesMatches, dnsErr := crypto.CheckCertificateNamesAndIPs(r.resource.Data[kubeadmconstants.APIServerCertName], commonNames)
|
||||
|
||||
Reference in New Issue
Block a user