[release-ocm-2.17] ACM-35997: apply disk encryption defaults on cluster create and update#10513
Conversation
In OCPBUGS-86731 the issue was likelly caused by DiskEncryptionEnabledOn was an empty string and the validation threated empty string as enabled. A new test is also added to test the robustness.
Normalize nil or empty disk_encryption enable_on and mode to none and tpmv2 when syncing from AgentClusterInstall and when persisting cluster updates. Prevents writing an empty enable_on while mode stays tpmv2, which could leave hosts stuck in Discovering during hardware validation.
…kencryption tests so CI ginkgo flags are accepted, and remove the unused ginkgo table import from hostutil tests.
Use RequestsConfiguration at the API boundary so tang mode or tang_servers without enable_on cannot bypass the disk encryption feature gate on unsupported platforms.
…mon solution would be used in the whole project. a separate follow-up task will be added
Introduce HasMode for raw mode checks and IsSetWithTang as the Tang counterpart to IsSetWithTpm, then replace scattered inline enable_on and mode comparisons with the shared helpers in validators, manifest generation, API validation, and tang connectivity checks. This keeps runtime paths on IsSetWithTpm/IsSetWithTang, payload validation on HasMode where enable_on may still be unset, and role targeting on EnabledForRole everywhere.
|
@openshift-cherrypick-robot: Ignoring requests to cherry-pick non-bug issues: ACM-34978 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-ocm-2.17 #10513 +/- ##
====================================================
+ Coverage 44.40% 44.43% +0.02%
====================================================
Files 418 419 +1
Lines 72957 72998 +41
====================================================
+ Hits 32394 32434 +40
- Misses 37643 37644 +1
Partials 2920 2920
🚀 New features to boost your workflow:
|
|
/retest |
|
@openshift-cherrypick-robot: This pull request references ACM-35997 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@openshift-cherrypick-robot: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This is an automated cherry-pick of #10442
/assign andrej1991