You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG/MINOR: fix stale crt-list entry after gateway deletion
When a gateway is deleted, gateway.reset() replaces g.Listeners with a
new empty map before the certificate builder runs. secretsPerVirtualListener
then calls GetListenerForKey for each entry in previousReferencedSecrets;
since g.Listeners is empty it returns nil and silently drops the deleted
gateway's secrets from the previous virtual-listener mapping.
handleUpdatedCrtList therefore computes an empty removedSecretRefsForListener
and skips the crt-list update. The PEM is still deleted (handleDeReferencedSecretsStorage
fires on the raw secret diff), leaving a .list file that references a
non-existent PEM and causing HAProxy to fail on the next reload.
Fix by replacing the indirect reconstruction of the previous mapping with
previousSecretsPerVirtualListener, which reads directly from
GateTree.PreviousVirtualListeners. The *Listener values stored there are
held by the VirtualListener slice and survive gateway.reset() because
reset only reassigns the map pointer on the Gateway, not the Listener
objects themselves.
0 commit comments