Commit 8adaf28
committed
fix(hcco): OCPBUGS-88738 clean up orphaned mirrored CMs on NodePool deletion
The guard added in PR #8672 unconditionally skips deletion of guest-side
ConfigMaps with NTOMirroredConfigLabel, preventing spurious MCO rollouts
when the source CM is transiently absent. However, this also preserves
CMs whose owning NodePool has been permanently deleted.
Derive NodePool existence from the wantCMList already fetched from the
HCP namespace: when a NodePool is deleted, its finalizer removes all its
CMs, so zero CMs for a given NodePool means it has been deleted. Build
an activeNodePools set and only skip deletion when the owning NodePool
is still active.
Signed-off-by: Vimal Solanki <vsolanki@redhat.com>1 parent ca3d347 commit 8adaf28
2 files changed
Lines changed: 80 additions & 11 deletions
File tree
- control-plane-operator/hostedclusterconfigoperator/controllers/resources
Lines changed: 28 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3016 | 3016 | | |
3017 | 3017 | | |
3018 | 3018 | | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
3019 | 3033 | | |
3020 | 3034 | | |
3021 | 3035 | | |
| |||
3059 | 3073 | | |
3060 | 3074 | | |
3061 | 3075 | | |
3062 | | - | |
3063 | | - | |
3064 | | - | |
3065 | | - | |
3066 | | - | |
3067 | | - | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
3068 | 3080 | | |
3069 | | - | |
3070 | | - | |
3071 | | - | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
3072 | 3091 | | |
3073 | 3092 | | |
3074 | 3093 | | |
| |||
Lines changed: 52 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1649 | 1649 | | |
1650 | 1650 | | |
1651 | 1651 | | |
1652 | | - | |
1653 | | - | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
1654 | 1659 | | |
1655 | 1660 | | |
| 1661 | + | |
| 1662 | + | |
1656 | 1663 | | |
1657 | 1664 | | |
1658 | 1665 | | |
| 1666 | + | |
1659 | 1667 | | |
1660 | 1668 | | |
1661 | 1669 | | |
| |||
1667 | 1675 | | |
1668 | 1676 | | |
1669 | 1677 | | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
1670 | 1720 | | |
1671 | 1721 | | |
1672 | 1722 | | |
| |||
0 commit comments