Browse Source

Merge pull request #690 from erikwilson/regenerate-certs-on-ca-change

Regenerate server certs if CA changed
pull/705/head
Erik Wilson 5 years ago committed by GitHub
parent
commit
be0cc6e943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      pkg/tls/storage.go

8
pkg/tls/storage.go

@ -65,8 +65,7 @@ func (l *listenerConfigStorage) Set(config *dynamiclistener.ListenerStatus) (*dy
obj.Status = *config
obj.Status.Revision = ""
if l.config.CACerts != "" && l.config.CAKey != "" {
obj.Status.CACert = ""
if l.config.CAKey != "" {
obj.Status.CAKey = ""
}
@ -94,7 +93,10 @@ func (l *listenerConfigStorage) fromStorage(obj *v1.ListenerConfig) *dynamiclist
copy.Status.Revision = obj.ResourceVersion
if l.config.CACerts != "" && l.config.CAKey != "" {
copy.Status.CACert = l.config.CACerts
if copy.Status.CACert != l.config.CACerts {
copy.Status.CACert = l.config.CACerts
copy.Status.GeneratedCerts = map[string]string{}
}
copy.Status.CAKey = l.config.CAKey
}

Loading…
Cancel
Save