Commit 5ff7dcd
[release-1.1] 🐛 Fix health check to support partial probe results with multi-probe configuration (#343)
* 🐛 Fix health check to support partial probe results with multi-probe configuration
When multiple health check probes are configured, if the first probe
returns empty feedback results, the health check was incorrectly marking
the addon as Unknown and returning early, preventing other probes from
being evaluated.
This fix changes the logic to:
- Collect all empty probe fields instead of returning immediately
- Only mark the addon as Unknown if ALL probes have no results
- Allow partial probe results to be considered valid
- Remove redundant check for non-empty results after healthChecker
Fixes #341
Signed-off-by: Claude <[email protected]>
Signed-off-by: zhujian <[email protected]>
* Refactor health check probe result handling
Simplify the probe result collection logic by:
- Collecting all probe results upfront, regardless of healthChecker
- Checking for empty results based on FieldResults length
- Removing unnecessary tracking of empty probe fields
- Updating test expectations for multi-probe scenarios
This makes the code cleaner and maintains the fix for supporting
partial probe results with multi-probe configurations.
Signed-off-by: Jia Zhu <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: zhujian <[email protected]>
---------
Signed-off-by: Claude <[email protected]>
Signed-off-by: zhujian <[email protected]>
Co-authored-by: zhujian <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent c2f5c52 commit 5ff7dcd
File tree
3 files changed
+89
-17
lines changed- pkg/addonmanager/controllers/agentdeploy
- test/integration/kube
3 files changed
+89
-17
lines changedLines changed: 19 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
| 197 | + | |
206 | 198 | | |
207 | 199 | | |
| 200 | + | |
208 | 201 | | |
209 | 202 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 203 | | |
214 | 204 | | |
215 | 205 | | |
| |||
238 | 228 | | |
239 | 229 | | |
240 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | | - | |
| 246 | + | |
243 | 247 | | |
244 | 248 | | |
245 | 249 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1262 | 1330 | | |
1263 | 1331 | | |
1264 | 1332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
922 | 922 | | |
923 | 923 | | |
924 | 924 | | |
925 | | - | |
926 | | - | |
| 925 | + | |
| 926 | + | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| |||
0 commit comments