fix: remap v1alpha2 field paths in instance group set/unset commands#18481
fix: remap v1alpha2 field paths in instance group set/unset commands#18481carterpewpew wants to merge 1 commit into
Conversation
SetInstancegroupFields and UnsetInstancegroupFields did not translate legacy v1alpha2 field names (e.g. spec.rootVolumeType) to their internal equivalents (spec.rootVolume.type). Users who read field names from `kops edit instancegroup` YAML and pass them via --set or --unset get a "field not found" error. Add InternalPathForInstanceGroupField with a mapping table for the seven rootVolume fields, mirroring InternalPathForClusterField from PR kubernetes#16898. Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
|
Hi @carterpewpew. Thanks for your PR. I'm waiting for a kubernetes 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
What this PR does / why we need it:
kops edit instancegroup --set spec.rootVolumeType=gp3fails with "field not found" because the internal struct uses the nested pathspec.rootVolume.type. Users naturally copy field names from the YAML they see inkops edit instancegroup, which uses the v1alpha2 flat names. This adds a field mapping that translates the seven legacyrootVolume*field names to their internalrootVolume.*equivalents in both--setand--unsetcommands.Which issue(s) this PR fixes:
Fixes #17622
Special notes for your reviewer:
This mirrors how
SetClusterFieldsalready remaps legacy cluster field paths viaInternalPathForClusterField.