Add StorageProfile "Recognized" status condition#4044
Conversation
| provisionerRecognized, parametersRecognized := storagecapabilities.IsRecognized(sc) | ||
| switch { | ||
| case provisionerRecognized && parametersRecognized: | ||
| updateConditionState(&cond.ConditionState, v1.ConditionTrue, "Provisioner is recognized", reasonRecognizedProvisioner) |
There was a problem hiding this comment.
probably want to make these constants as well. Since a condition has both a reason and message field. Just call them xxxReason, and xxxMessage
| } | ||
|
|
||
| // IsRecognized checks if the storage class provisioner and parameters are recognized so capabilities are available | ||
| func IsRecognized(sc *storagev1.StorageClass) (bool, bool) { |
There was a problem hiding this comment.
Maybe just make a type string, that maps onto one of the 3 reasons here. Or define that in the types.go. And have a function that returns the type. Then you can use that in the switch in controller. I don't really like bool, bool return type of this function. It gets really hard to tell what the booleans means.
7cb4a42 to
5f01627
Compare
5f01627 to
eb67528
Compare
Explaining if the provisioner or the storage class parameters are not recognized, so ClaimPropertySets are not auto-filled and need to be specified by the user. Signed-off-by: Arnon Gilboa <[email protected]> Co-authored-by: Cursor <[email protected]>
eb67528 to
63e1575
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awels 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 |
|
/test pull-containerized-data-importer-e2e-ceph-wffc |
1 similar comment
|
/test pull-containerized-data-importer-e2e-ceph-wffc |
What this PR does / why we need it:
Explaining if the provisioner or the storage class parameters are not recognized, so
ClaimPropertySetsare not auto-filled and need to be specified by the user.jira-ticket: https://issues.redhat.com/browse/CNV-78356
Release note: