feat: add SBR detection-mode and NHC+FAR default configs - #276
Conversation
|
Hi @geetikakay. Thanks for your PR. I'm waiting for a openshift-virtualization member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
|
|
||
| var candidates []string | ||
| for _, profile := range profiles.Items { | ||
| sets, found, _ := unstructured.NestedSlice(profile.Object, "status", "claimPropertySets") |
There was a problem hiding this comment.
You should not be ignoring errors returned by unstructured functions
There was a problem hiding this comment.
I didn't opt to add error checks because it's purely downstream work and both volumeMode and accessModes are schema-required fields within claimPropertySets (enforced by CDI). They cannot be absent in data returned by the API server.
There was a problem hiding this comment.
just logging at debug level as a troubleshooting hint for corner cases?
There was a problem hiding this comment.
added. I use cause since it is optional so raising error might not be appropriate.
dba76b2 to
62edc11
Compare
|
/ok-to-test |
| # Admin should set platform.kubevirt.io/sbr-storage-class on HCO if multiple RWX classes exist. | ||
| - name: sbr-detection-config | ||
| path: active/node-remediation/storage-based-remediation-config.yaml.tpl | ||
| phase: 1 | ||
| install: always |
There was a problem hiding this comment.
are we going to mark this "feature" it as GA as merged or do we prefer to gate it with an opt-in annotation on HCO? see also: #271
There was a problem hiding this comment.
I did couple of changes(added opt-in). maturity, asserts and requires i could add once 271 is merge
1cb7453 to
0d2f2f1
Compare
0d2f2f1 to
9278df5
Compare
|
/lgtm |
|
@ksimon1: changing LGTM is restricted to collaborators 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 kubernetes-sigs/prow repository. |
|
cc @rlobillo |
|
❌ Generated Files Verification Failed One or more generated files in this PR are out of sync:
Please regenerate the files locally and commit the changes. |
|
@geetikakay in |
- Add StorageBasedRemediationConfig asset with detectOnlyMode: Enabled - Add NodeHealthCheck asset with FAR as remediator - Add storageProfileRWXClass template function to auto-detect RWX Filesystem StorageClass from CDI StorageProfiles - Add RBAC for cdi.kubevirt.io/storageprofiles and storage-based-remediation.medik8s.io/storagebasedremediationconfigs - Add unit tests for storageProfileRWXClass (single/multiple/none/nil) Admin can override storage class via platform.kubevirt.io/sbr-storage-class annotation on HCO. User must create fenceagentsremediationtemplate-default in openshift-workload-availability with BMC credentials. Signed-off-by: Geetika Kapoor <gkapoor@redhat.com> Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
9278df5 to
397077e
Compare
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiraboschi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
68df086
into
openshift-virtualization:main
| case "fence-agents-remediation.medik8s.io": | ||
| return "Fence Agents Remediation" | ||
| case "storage-based-remediation.medik8s.io": | ||
| return "Storage Based Remediation" |
There was a problem hiding this comment.
The official name has a hyphen
| return "Storage Based Remediation" | |
| return "Storage-Based Remediation" |
Admin can override storage class via platform.kubevirt.io/sbr-storage-class annotation on HCO. User must create fenceagentsremediationtemplate-default in openshift-workload-availability with BMC credentials.
Plan to add e2e in next PR