Wile looking into shipping a kubectl create something plugin via krew I noticed that the - => _ rewriting in
|
name = strings.ReplaceAll(name, "-", "_") |
makes this impossible right now.
Background: kubectl allows these create plugins (and only those) since kubernetes/kubernetes#124123.
Basically we have this situation:
$ kubectl create-something maps to the binary kubectl-create_something
$ kubectl create something maps to the binary kubectl-create-something
- krew does the mentioned rewriting, turning the binary of the
create-something plugin into the kubectl-create_something binary on disk (even though the binary in the plugin tar is properly named.
How could we allow to ship a kubectl-create-something binary?
xref https://kubernetes.slack.com/archives/CTJNMDM24/p1728488438493869
Wile looking into shipping a
kubectl create somethingplugin via krew I noticed that the- => _rewriting inkrew/internal/installation/install.go
Line 242 in 48b3ea1
Background: kubectl allows these create plugins (and only those) since kubernetes/kubernetes#124123.
Basically we have this situation:
$ kubectl create-somethingmaps to the binarykubectl-create_something$ kubectl create somethingmaps to the binarykubectl-create-somethingcreate-somethingplugin into thekubectl-create_somethingbinary on disk (even though the binary in the plugin tar is properly named.How could we allow to ship a
kubectl-create-somethingbinary?xref https://kubernetes.slack.com/archives/CTJNMDM24/p1728488438493869