mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
| .. | ||
| cluster.go | ||
| config_test.go | ||
| config.go | ||
| config.schema.json | ||
| kubectl.go | ||
| README.md | ||
POSH kubectl provider
Usage
Plugin
package main
type Plugin struct {
l log.Logger
cache cache.Cache
kubectl *kubectl.Kubectl
commands command.Commands
}
func New(l log.Logger) (plugin.Plugin, error) {
var err error
inst := &Plugin{
l: l,
cache: &cache.MemoryCache{},
commands: command.Commands{},
}
// ...
inst.kubectl, err = kubectl.New(l, inst.c)
if err != nil {
return nil, errors.Wrap(err, "failed to create kubectl")
}
// ...
return inst, nil
}
Config
## kubectl
kubectl:
configPath: .posh/config/kubectl
Ownbrew
To install binary locally, add:
ownbrew:
packages:
## https://kubernetes.io/releases/
- name: kubectl
tap: foomo/tap/kubernetes/kubectl
version: 1.28.4