kubernetes: kubectl edit brokenness editing volumeMounts (list of struct)
Start with:
volumeMounts:
- mountPath: /vol
name: vol
- mountPath: /vol-456
name: vol
subPath: d456
Edit to:
volumeMounts:
- mountPath: /vol
name: vol
- mountPath: /vol-d2
name: vol
subPath: d2
Read back what happened:
volumeMounts:
- mountPath: /vol-d2
name: vol
subPath: d2
- mountPath: /vol-456
name: vol
subPath: d456
It synthesized a COMPLETELY WRONG result. At this point, I can not, in good conscience, advocate using kubectl edit.
Can I please have kubectl edit --replace
that doesn’t go through patch brokenness. Or better, make that default for 1.5 and make kubectl edit --patch
be the broken (but eventually fixed) path.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (15 by maintainers)
Commits related to this issue
- Merge pull request #35071 from thockin/volume-mount-merge-key Automatic merge from submit-queue Change merge key for VolumeMount to mountPath Fixes #34800 — committed to kubernetes/kubernetes by deleted user 8 years ago
Change the key to mountPath is better. I’m not sure it’s guaranteed unique, but at least duplicate values there are not useful.
I can send a PR for that.
I 100% agree that
edit
==replace
. We should just fix that. It’s human-centric - patch is too clever.In this particular case, I’d rather see the whole list replaced, rather than an attempted patch, anyway.
On Mon, Oct 17, 2016 at 2:46 PM, Phillip Wittrock notifications@github.com wrote: