Commit d64a975
authored
fix: add DataSource reference handling to authorize utils (#3831)
* fix: add DataSource reference to authorize_utils
A previous PR[1] introduced the concept of DataSource references as a way
for a DataSource to reference another DataSource.
A DV that has its sourceRef set to a DataSource reference that resides
in a different namespace would fail as authorize utils did not include
the necessary changes to the clone source handler to accomodate
DataSource references.
This commit fixes that and introduces a functional test for it.
[1] #3760
Signed-off-by: Adi Aloni <[email protected]>
* datasource-controller: prohibit cross-namespace references
Previously a DataSource could reference a DataSource in a namespace
different from its own. This is unwanted behavior and with this commit
we now error when we create such DataSources.
Signed-off-by: Adi Aloni <[email protected]>
---------
Signed-off-by: Adi Aloni <[email protected]>1 parent cd0364a commit d64a975
File tree
5 files changed
+80
-5
lines changed- pkg
- apiserver/webhooks
- controller
- common
- staging/src/kubevirt.io/containerized-data-importer-api/pkg/apis/core/v1beta1
5 files changed
+80
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
361 | 417 | | |
362 | 418 | | |
363 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
399 | 400 | | |
400 | 401 | | |
401 | 402 | | |
| |||
2090 | 2091 | | |
2091 | 2092 | | |
2092 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
2093 | 2097 | | |
2094 | 2098 | | |
2095 | 2099 | | |
| 2100 | + | |
2096 | 2101 | | |
2097 | 2102 | | |
2098 | 2103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
246 | 256 | | |
247 | 257 | | |
248 | 258 | | |
| |||
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
0 commit comments