Add a mutex to protect against simultaneous read/write to backend config
This addresses issues found by race detector.
This commit is contained in:
parent
9122c08b3e
commit
d58dbde5e3
3 changed files with 20 additions and 9 deletions
|
|
@ -36,8 +36,8 @@ import (
|
|||
// syncSecret synchronizes the content of a TLS Secret (certificate(s), secret
|
||||
// key) with the filesystem. The resulting files can be used by NGINX.
|
||||
func (s k8sStore) syncSecret(key string) {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
s.syncSecretMu.Lock()
|
||||
defer s.syncSecretMu.Unlock()
|
||||
|
||||
klog.V(3).Infof("Syncing Secret %q", key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue