Commit 9d3a4aa
refactor(controller): centralize the companion ResourceBinding name codec
The "-configmap"/"-secret" suffix that maps a companion object to its Karmada
ResourceBinding name was open-coded across the GC, orphan-sweep, and resolver
paths. Add companionRBName as the inverse of companionFromRBName and share the
suffix constants so the build and parse sides cannot drift.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7aa906a commit 9d3a4aa
3 files changed
Lines changed: 26 additions & 10 deletions
File tree
- internal/controller
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
196 | 205 | | |
197 | 206 | | |
198 | 207 | | |
199 | | - | |
| 208 | + | |
200 | 209 | | |
201 | 210 | | |
202 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
1162 | 1169 | | |
1163 | 1170 | | |
1164 | 1171 | | |
1165 | | - | |
| 1172 | + | |
1166 | 1173 | | |
1167 | 1174 | | |
1168 | 1175 | | |
| |||
1205 | 1212 | | |
1206 | 1213 | | |
1207 | 1214 | | |
1208 | | - | |
| 1215 | + | |
1209 | 1216 | | |
1210 | 1217 | | |
1211 | 1218 | | |
| |||
0 commit comments