Commit 52ccc2d
fix: skip secret lookup when tls[].secretName is empty (fixes spurious warning with wildcard TLS) (#10543)
* fix: skip secret lookup when tls[].secretName is empty
When an Ingress has a tls: block with no secretName (relying on
--wildcard-tls-secret), createIngressEx() was unconditionally
attempting secretStore.GetSecret("namespace/") — an invalid key that
can never exist — and emitting a spurious warning on every sync:
W controller.go] Error trying to get the secret for Ingress <name>: secret doesn't exist or of an unsupported type
Note the double space: secretName is "" and prints as blank.
The downstream addSSLConfig() already handles this case correctly by
falling through to the wildcard cert path when secretName == "" and
isWildcardEnabled == true, so TLS works correctly. The warning is a
false positive.
Fix: guard the lookup with a secretName == "" check and store an
empty SecretReference{} instead. The downstream code path is
unchanged and wildcard TLS continues to work.
At scale (clusters with 3000+ wildcard-TLS ingresses) this removes
thousands of spurious warnings per resync and the reload pressure
they cause.
Fixes #10218
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Rahul Sawra <r.sawra@gmail.com>
---------
Signed-off-by: Rahul Sawra <r.sawra@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Venktesh Patel <ve.patel@f5.com>1 parent bc5e2cf commit 52ccc2d
2 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2740 | 2740 | | |
2741 | 2741 | | |
2742 | 2742 | | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
2743 | 2751 | | |
2744 | 2752 | | |
2745 | 2753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2435 | 2435 | | |
2436 | 2436 | | |
2437 | 2437 | | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
2438 | 2494 | | |
2439 | 2495 | | |
2440 | 2496 | | |
| |||
0 commit comments