mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Regenerate server certs if CA changed
This commit is contained in:
parent
4a65764c3b
commit
a74d9e5282
@ -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…
Reference in New Issue
Block a user