apiserver: don't create self-signed certs with disabled secure serving

This commit is contained in:
Dr. Stefan Schimanski 2018-07-04 19:09:26 +02:00
parent 692f9bb7b1
commit 798535164a

View File

@ -236,7 +236,7 @@ func (s *SecureServingOptions) ApplyTo(config **server.SecureServingInfo) error
}
func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress string, alternateDNS []string, alternateIPs []net.IP) error {
if s == nil {
if s == nil || (s.BindPort == 0 && s.Listener == nil) {
return nil
}
keyCert := &s.ServerCert.CertKey