Merge pull request #6796 from aledbf/default
Updates to the custom default SSL certificate must trigger a reload
This commit is contained in:
commit
d9f613e52a
4 changed files with 20 additions and 3 deletions
|
@ -491,6 +491,7 @@ func (n *NGINXController) getConfiguration(ingresses []*ingress.Ingress) (sets.S
|
|||
UDPEndpoints: n.getStreamServices(n.cfg.UDPConfigMapName, apiv1.ProtocolUDP),
|
||||
PassthroughBackends: passUpstreams,
|
||||
BackendConfigChecksum: n.store.GetBackendConfiguration().Checksum,
|
||||
DefaultSSLCertificate: n.getDefaultSSLCertificate(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,5 +71,10 @@ func (s SSLCert) GetObjectKind() schema.ObjectKind {
|
|||
|
||||
// HashInclude defines if a field should be used or not to calculate the hash
|
||||
func (s SSLCert) HashInclude(field string, v interface{}) (bool, error) {
|
||||
return (field != "PemSHA" && field != "CASHA" && field != "ExpireTime"), nil
|
||||
switch field {
|
||||
case "PemSHA", "CASHA", "ExpireTime":
|
||||
return true, nil
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,8 @@ type Configuration struct {
|
|||
|
||||
// ConfigurationChecksum contains the particular checksum of a Configuration object
|
||||
ConfigurationChecksum string `json:"configurationChecksum,omitempty"`
|
||||
|
||||
DefaultSSLCertificate *SSLCert `json:"-"`
|
||||
}
|
||||
|
||||
// Backend describes one or more remote server/s (endpoints) associated with a service
|
||||
|
@ -125,7 +127,12 @@ type TrafficShapingPolicy struct {
|
|||
|
||||
// HashInclude defines if a field should be used or not to calculate the hash
|
||||
func (s Backend) HashInclude(field string, v interface{}) (bool, error) {
|
||||
return (field != "Endpoints"), nil
|
||||
switch field {
|
||||
case "Endpoints":
|
||||
return false, nil
|
||||
default:
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
// SessionAffinityConfig describes different affinity configurations for new sessions.
|
||||
|
|
|
@ -29,6 +29,10 @@ func (c1 *Configuration) Equal(c2 *Configuration) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
if !c1.DefaultSSLCertificate.Equal(c2.DefaultSSLCertificate) {
|
||||
return false
|
||||
}
|
||||
|
||||
match := compareBackends(c1.Backends, c2.Backends)
|
||||
if !match {
|
||||
return false
|
||||
|
@ -271,7 +275,7 @@ func (s1 *Server) Equal(s2 *Server) bool {
|
|||
if s1.SSLPassthrough != s2.SSLPassthrough {
|
||||
return false
|
||||
}
|
||||
if !(s1.SSLCert).Equal(s2.SSLCert) {
|
||||
if !s1.SSLCert.Equal(s2.SSLCert) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue