push
github
fix(controller): avoid nil queue panic in DNS name resolver handlers (#6845) When the controller starts with --enable-dns-name-resolver=true but --enable-anp=false, updateAnpQueue and updateCnpQueue are never constructed. Any DNSNameResolver CR carrying the "anp" label (e.g. left over from a period when ANP was enabled) then drives handleAddOrUpdateDNSNameResolver/handleDeleteDNSNameResolver into calling Add on a nil workqueue, which panics the whole controller process and forms a crash loop on every restart. Skip the handlers when ANP support is disabled and warn at startup about the ineffective configuration. Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 4d9089020)
10 of 13 new or added lines in 2 files covered. (76.92%)
2 existing lines in 1 file now uncovered.14355 of 56776 relevant lines covered (25.28%)
0.29 hits per line