Commit 70ae01d
authored
Return associated pod data for deployments, etc., as part of the payload (#1017)
* Generate assocation blocks for deployments with their related pods.
Also:
- Add `metadata.state.{error,message,transitioning`} to `_v1_Pod_fields` table
(We already index `metadata.state.name` for all GVKs
- Return an array called `metadata.associations` for each GVK we care about.
- Right now there will be at most one entry:
`{ GVK: podGVK, data: <array of info on each pod's metadata.state associated with the deployment> }`
- The integration tests rely on the core rancher deployments, which all have associated pods.
- No need to add "fake" deployments.
- Write a more generic db-client routine to read rows containing n string values.
* We need to also show jobs associated with cron jobs.
- One problem is that pods are related to their parent objects via
`metadata.relationships[toType=pod].selector`
but jobs are related to parent `batch.cronjobs` via
`metadata.relationships[toType=batch.job].toId`
I wrote separate selection functions for each form.
Also:
Drop ReadStrings2 in favor of 'ReadStringsN(..., 2)'
* Misc changes:
- If a yaml load fails modify the error to give the input file name.
- s/podname/childname/ and add integration tests for deployment/pod relationships
* Add the includeAssociatedData query param.
* Ensure user has access to the associated resource.
- Fix a unit-test to ensure the user has access to the child schema.
- Demote access denial to associated data to a trace log.
* This test often fails in CI, so add debug statements to help diagnose why.1 parent 5a529fb commit 70ae01d
File tree
26 files changed
+1387
-76
lines changed- pkg
- sqlcache
- db
- informer
- factory
- sqltypes
- store
- stores
- sqlpartition/listprocessor
- sqlproxy
- tests/integration
- testdata
- associateddata
- associations
26 files changed
+1387
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
327 | | - | |
| 326 | + | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
339 | | - | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
351 | 353 | | |
352 | 354 | | |
353 | 355 | | |
354 | | - | |
355 | | - | |
| 356 | + | |
| 357 | + | |
356 | 358 | | |
357 | 359 | | |
358 | 360 | | |
359 | 361 | | |
| 362 | + | |
360 | 363 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
365 | 371 | | |
366 | 372 | | |
367 | 373 | | |
368 | | - | |
369 | | - | |
| 374 | + | |
370 | 375 | | |
371 | 376 | | |
372 | 377 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
182 | 188 | | |
183 | 189 | | |
184 | 190 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments