Removes wrong secret enqueing and improve the Fake Cert generation
This commit is contained in:
parent
6c1b45a663
commit
51235a38e8
3 changed files with 11 additions and 28 deletions
|
|
@ -43,28 +43,9 @@ func (ic *GenericController) syncSecret(k interface{}) error {
|
|||
return fmt.Errorf("deferring sync till endpoints controller has synced")
|
||||
}
|
||||
|
||||
// check if the default certificate is configured
|
||||
key := fmt.Sprintf("default/%v", defServerName)
|
||||
_, exists := ic.sslCertTracker.Get(key)
|
||||
var key string
|
||||
var cert *ingress.SSLCert
|
||||
var err error
|
||||
if !exists {
|
||||
if ic.cfg.DefaultSSLCertificate != "" {
|
||||
cert, err = ic.getPemCertificate(ic.cfg.DefaultSSLCertificate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
defCert, defKey := ssl.GetFakeSSLCert()
|
||||
cert, err = ssl.AddOrUpdateCertAndKey("default-fake-certificate", defCert, defKey, []byte{})
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
cert.Name = defServerName
|
||||
cert.Namespace = api.NamespaceDefault
|
||||
ic.sslCertTracker.Add(key, cert)
|
||||
}
|
||||
|
||||
key = k.(string)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue