Commit c705e25
committed
CMP-3613: Gracefully handle profile deprecation checks
Previously, when the operator checked if a profile was deprecated, it
would fail if it couldn't reliably detect the profile bundle used for
the profile. This is because the profile bundle contained the profiles,
which carries the deprecation flag. If the operator doesn't know which
profile bundle a profile came from, it can't guarantee it knows if the
profile is supported or not.
This is mostly fine when users are scanning their environments using
ScanSettingBindings, which rely on existing Profile and ProfileBundle
resources. But, if a user is creating a ComplianceSuite or
ComplianceScan directly, they get to set the content and content image
for the scan, which usually comes from the profile and profile bundle.
If a user specifies a content image pointing to their own content (or
even in our testing cases, where we point to content images built for
each pull request), that is going to mismatch with the default profile
bundles, meaning they can't create a ComplianceScan directly to hook in
their own content anymore because the deprecation logic will always
error out looking for a profile bundle that it assumes must exist.
This commit relaxes that requirement, but maintains the default behavior
so that users relying on ScanSettingBindings still get deprecation
notices when they should, and allows power users the ability to set
their own content images directly without breaking the workflow on the
deprecation check.1 parent cfcd702 commit c705e25
File tree
2 files changed
+62
-3
lines changed- pkg/controller/compliancescan
- tests/e2e/parallel
2 files changed
+62
-3
lines changedLines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
333 | | - | |
334 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3404 | 3404 | | |
3405 | 3405 | | |
3406 | 3406 | | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
0 commit comments