abrochard / kubel

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

When listing `StorageClasses` the name gets added a suffix ` (default)` which invalidates any action on it #106

Closed d1egoaz closed 1 year ago

d1egoaz commented 1 year ago

This is the first time that I'm seeing kubectl changed the underlying name for a resource in the output.

Listing the resources via kubectl get

Kubel result: image

Kubectl result:

NAME                     PROVISIONER                    RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
local-storage            kubernetes.io/no-provisioner   Delete          WaitForFirstConsumer   false                  23m
premium-rwo              pd.csi.storage.gke.io          Delete          WaitForFirstConsumer   true                   13d
ssd                      kubernetes.io/gce-pd           Delete          Immediate              true                   13d
ssd-replicated           kubernetes.io/gce-pd           Delete          Immediate              false                  13d
standard (default)       kubernetes.io/gce-pd           Delete          Immediate              true                   13d
standard-rwo (default)   pd.csi.storage.gke.io          Delete          WaitForFirstConsumer   true                   13d

Double checking that the name was modified by kubectl:

Using

kubectl get storageclasses --context <context>  -o custom-columns=":metadata.name"
local-storage
premium-rwo
ssd
ssd-replicated
standard
standard-rwo

Issue

calling kubel-get-resource-details returns the following error:

Error from server (NotFound): storageclasses.storage.k8s.io "standard-rwo (default)" not found

as the command executed is:

kubectl --context <context> --namespace <namespace> get storageclasses.storage.k8s.io standard-rwo (default) -o yaml

as calling kubel--get-resource-under-cursor returns "standard-rwo (default)"