Skip to content

Commit a9484b4

Browse files
ivanmatmatioktalz
authored andcommitted
MINOR: avoid runtime update if reload scheduled
1 parent 6d57d5e commit a9484b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/haproxy/certs/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ func (c *certs) AddSecret(secret *store.Secret, secretType SecretType) (certPath
159159
}
160160

161161
func (c *certs) updateRuntime(filename string, payload []byte) (bool, error) {
162+
if instance.NeedReload() {
163+
return false, nil
164+
}
162165
// Only 1 transaction in parallel is possible for now in haproxy
163166
// Keep this mutex for now to ensure that we perform 1 transaction at a time
164167
c.mu.Lock()
@@ -216,6 +219,9 @@ func (c *certs) updateRuntime(filename string, payload []byte) (bool, error) {
216219
}
217220

218221
func (c *certs) deleteRuntime(crtList, filename string) error {
222+
if instance.NeedReload() {
223+
return nil
224+
}
219225
// Only 1 transaction in parallel is possible for now in haproxy
220226
// Keep this mutex for now to ensure that we perform 1 transaction at a time
221227
c.mu.Lock()

0 commit comments

Comments
 (0)