|
Ran
|
Jobs
1
|
Files
207
|
Run time
1min
|
Badge
README BADGES
|
push
github
fix(controller): skip in-pod cleanup when VPC NAT gateway CRD is deleted (#6784) (#6798) Backport of #6784 to release-1.16. The in-pod cleanup helpers (deleteEipInPod, delEipQoSInPod, deleteFipInPod, deleteDnatInPod, deleteSnatInPod) used the NAT gateway pod as the termination sentinel: a missing pod made delEipQoSInPod retry forever (EIP stuck) and made the others silently skip cleanup even when the gateway was only being recreated. Introduce the natGwDeleted helper that uses the VpcNatGateway CRD as the sentinel: CRD gone -> return nil (nothing to clean up); CRD present but pod absent -> return the error so the reconciler retries until the pod is ready (logged at klog.V(4) to avoid noise during rolling updates). Adapted from upstream commit f331bbb07: release-1.16 helpers take a single-arg getNatGwPod(dp) (no namespace) and lack natGwNamespaceByName / normalizeSnatInternalCIDR, so the changes were applied manually. Unit tests are provided in a self-contained vpc_nat_gw_cleanup_test.go. (cherry picked from commit f331bbb07) Signed-off-by: Mengxin Liu <liumengxinfly@gmail.com>
63 of 82 new or added lines in 2 files covered. (76.83%)
17 existing lines in 1 file now uncovered.14226 of 56669 relevant lines covered (25.1%)
0.29 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 12 |
8.09 |
2.63% | pkg/controller/vpc_nat_gw_nat.go |
| 7 |
4.82 |
4.82% | pkg/controller/vpc_nat_gw_eip.go |
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 17 |
20.67 |
-0.02% | pkg/controller/vpc.go |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 26731493191.1 | 207 |
25.1 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|