Commit 0d2a3b6
committed
fix(certificates): only delete k8s secrets for certs when last domain associated is detached
Before the code would delete the secret on every detach but now instead it checks if there are any domains associated still with the certificate before deleting.
It can do so before the association between domain and cert is nulled out a few lines up.
This wasn't caught since the exception rule is to log the error instead of blowing up. There are tests that expose this behaviour but only against a real k8s cluster1 parent 4f6b31b commit 0d2a3b6
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
212 | 215 | | |
213 | 216 | | |
214 | 217 | | |
| |||
0 commit comments