mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Do not create self-signed certs if port is zero
This commit is contained in:
parent
f8dd91fb28
commit
f0abf15ea7
@ -175,7 +175,7 @@ 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 {
|
||||||
keyCert := &s.ServerCert.CertKey
|
keyCert := &s.ServerCert.CertKey
|
||||||
|
|
||||||
if s == nil || len(keyCert.CertFile) != 0 || len(keyCert.KeyFile) != 0 {
|
if s == nil || s.ServingOptions.BindPort == 0 || len(keyCert.CertFile) != 0 || len(keyCert.KeyFile) != 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user