Read zone information from PowerFlex secret#810
Conversation
| type StorageArrayConfig struct { | ||
| SystemID string `json:"systemId"` | ||
| Zone struct { | ||
| Label string `json:"label"` | ||
| } `json:"zone"` |
There was a problem hiding this comment.
Zones in the secret will have both the 'name' and the 'label' fields, right? Do we need to keep track of both of those?
There was a problem hiding this comment.
Ahh, right, confirmed with Trevor. Was confused with a different acceptance criteria:
zone:
label: <user defined label name>=<zone name>
Fixed. Also, fixed the AC.
pkg/drivers/powerflex_test.go
Outdated
| zone: | ||
| label: topology.kubernetes.io/zone=US-EAST |
There was a problem hiding this comment.
Secret should have both 'labelKey' and 'name' fields, I think-- check with @tdawe or double-check the latest proposed spec
There was a problem hiding this comment.
Yes, you're right. Thanks! confirmed with Trevor. Was confused with a different acceptance criteria:
Fixed. Also, fixed the AC.
pkg/drivers/powerflex.go
Outdated
| if configParam.SystemID == "" { | ||
| return nil, fmt.Errorf("invalid value for SystemID") | ||
| } | ||
| if configParam.Zone.Label != "" { |
There was a problem hiding this comment.
I think that your code is accessing the secret as if it only has one field, and that field is in the format of "<labelkey>=<zone name>"? Which is what my other two comments are referring to. But I don't believe that's the structure of the proposed zoning secrets.
Description
PR adds the method to read the zoning information from the PowerFlex array secret
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
pflex-e2e-suite-standalone.txt