feat(krew): add krew manifest to manually setup plugin

This commit is contained in:
RouxAntoine 2024-12-22 12:07:56 +01:00
parent a4757692a6
commit 9bb3acb693
No known key found for this signature in database
GPG Key ID: 098FB66FC0475E70
3 changed files with 80 additions and 0 deletions

11
krew/README.md Normal file
View File

@ -0,0 +1,11 @@
# Setup kubectx and kubens
manually install kubectx and kubens from manifest file
this add autocomplete plugin capabilities
```shell
$ kubectl krew install --manifest=ns.yaml
$ kubectl krew install --manifest=ctx.yaml
```

35
krew/ctx.yaml Normal file
View File

@ -0,0 +1,35 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: ctx
spec:
homepage: https://github.com/ahmetb/kubectx
shortDescription: Switch between contexts in your kubeconfig
version: v0.9.5-1
description: |
Also known as "kubectx", a utility to switch between context entries in
your kubeconfig file efficiently.
caveats: |
If fzf is installed on your machine, you can interactively choose
between the entries using the arrow keys, or by fuzzy searching
as you type.
See https://github.com/RouxAntoine/kubectx for customization and details.
platforms:
- selector:
matchExpressions:
- key: os
operator: In
values:
- darwin
- linux
uri: https://github.com/ahmetb/RouxAntoine/archive/v0.9.5-1.tar.gz
sha256: c94392fba8dfc5c8075161246749ef71c18f45da82759084664eb96027970004
bin: kubectx
files:
- from: kubectx-*/kubectx
to: .
- from: kubectx-*/LICENSE
to: .
- from: kubectx-*/completion/plugins/kubectl_complete-ctx
to: completion

34
krew/ns.yaml Normal file
View File

@ -0,0 +1,34 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: ns
spec:
homepage: https://github.com/ahmetb/kubectx
shortDescription: Switch between Kubernetes namespaces
version: v0.9.5-1
description: |
Also known as "kubens", a utility to set your current namespace and switch
between them.
caveats: |
If fzf is installed on your machine, you can interactively choose
between the entries using the arrow keys, or by fuzzy searching
as you type.
platforms:
- selector:
matchExpressions:
- key: os
operator: In
values:
- darwin
- linux
uri: https://github.com/RouxAntoine/kubectx/archive/v0.9.5-1.tar.gz
sha256: c94392fba8dfc5c8075161246749ef71c18f45da82759084664eb96027970004
bin: kubens
files:
- from: kubectx-*/kubens
to: .
- from: kubectx-*/LICENSE
to: .
- from: kubectx-*/completion/plugins/kubectl_complete-ns
to: completion