abrochard / kubel

Emacs extension for controlling Kubernetes with limited permissions
GNU General Public License v3.0
259 stars 41 forks source link

Remove suffix ` (default)` when acting on resources of `StorageClasses` #107

Closed d1egoaz closed 1 year ago

d1egoaz commented 1 year ago

Fixes https://github.com/abrochard/kubel/issues/106

now calling kubel--get-resource-under-cursor returns "standard-rwo" from a name having standard-rwo (default)

abrochard commented 1 year ago

Thank you for submitting this! It does look like it fixes the issue, but do you know why the StorageClasses are being suffixed that way in the first place?

d1egoaz commented 1 year ago

It was sadly added here https://github.com/kubernetes/kubernetes/pull/34638

The original PR intent wanted to add an additional column (like most resources), however it was later changed in the same PR https://github.com/kubernetes/kubernetes/pull/34638#issuecomment-253825750

This is where the magic happens https://github.com/kubernetes/kubernetes/blob/57eb5d631ccd615cd161b6da36afc759af004b93/pkg/printers/internalversion/printers.go#L2387-L2388

I guess, this is and edge case and it's not the norm

d1egoaz commented 1 year ago

The funny thing is the only thing in this file that changes the actual resource name, it has been like this since 2016, I doubt they will fix it.

abrochard commented 1 year ago

Makes sense! Thank you!