Commit 04070cbc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #38381 from sttts/sttts-no-certs-for-zero-port

Automatic merge from submit-queue apiserver(s): do not create self-signed certs if port is zero
parents 61242f74 8abdbfcb
...@@ -173,9 +173,11 @@ func (s *ServingOptions) AddDeprecatedFlags(fs *pflag.FlagSet) { ...@@ -173,9 +173,11 @@ func (s *ServingOptions) AddDeprecatedFlags(fs *pflag.FlagSet) {
} }
func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress string, alternateIPs ...net.IP) error { func (s *SecureServingOptions) MaybeDefaultWithSelfSignedCerts(publicAddress string, alternateIPs ...net.IP) error {
if s == nil {
return nil
}
keyCert := &s.ServerCert.CertKey keyCert := &s.ServerCert.CertKey
if s.ServingOptions.BindPort == 0 || len(keyCert.CertFile) != 0 || len(keyCert.KeyFile) != 0 {
if s == nil || len(keyCert.CertFile) != 0 || len(keyCert.KeyFile) != 0 {
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment