Commit 0db12c2
fix: restore warn behavior for ApisixTls with missing secrets
When ApisixTls references secrets that do not exist yet, the webhook
should warn (not deny). The ADC validator calls PrepareApisixTlsForValidation
which in turn calls validateSecret, which returns NotFound and causes
admission denial - breaking the original warn-on-missing-secret behavior.
Fix: skip ADC validation when collectWarnings already detected missing
secrets. The translator cannot load cert/key material in that case, so
ADC validation would always fail anyway. The existing warnings are
sufficient to inform the user.
Also fix initErr fail-open: a validator initialization failure should
allow admission (return warnings, nil) rather than hard-deny every write.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5f3e401 commit 0db12c2
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
107 | | - | |
108 | | - | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
| |||
0 commit comments