Documentation ¶
Index ¶
- Constants
- Variables
- func ContextGC()
- func DelHelmContext(helmContextName string) error
- func NewHelmClient(r interface{}, opts ...WithHelmContextOpt) (client adapter.Adapter, e error)
- func NewHelmClientTemporary(r interface{}, opts ...WithHelmContextOpt) (client adapter.Adapter, e error)
- type ContextRequest
- type HelmContext
- type KubeNamespaceRequest
- type TemporaryContext
- type TemporaryContextRequest
- type TemporaryKubeRequest
- type TemporaryRepoRequest
- type WithHelmContextOpt
Constants ¶
View Source
const ( CONTEXT_CONFIG = `config.yaml` KUBECONFIG = `kubeconfig.yaml` LOCKFILE = `/helm-api.lock` )
View Source
const HelmClientInContextName = `helm_context`
Variables ¶
View Source
var NoContextInfo = fmt.Errorf(`NoContextInfo`)
View Source
var NoTemporaryContextInfo = fmt.Errorf(`NoTemporaryContextInfo`)
Functions ¶
func NewHelmClient ¶
func NewHelmClient(r interface{}, opts ...WithHelmContextOpt) (client adapter.Adapter, e error)
func NewHelmClientTemporary ¶
func NewHelmClientTemporary(r interface{}, opts ...WithHelmContextOpt) (client adapter.Adapter, e error)
Types ¶
type ContextRequest ¶
type ContextRequest interface {
GetContextName() string
}
type HelmContext ¶
type HelmContext struct { ContextDir string Name string KubeConfigPath, KubeContext, KubeNamespace string Incluster bool Expiry int64 }
HelmContext
func LoadHelmContext ¶
func LoadHelmContext(helmContextName string) (hc *HelmContext, e error)
LoadHelmContext
func NewHelmContext ¶
func NewHelmContext(name string, incluster bool, kubeconfig []byte, context, namespace string, ExpiryTime time.Time, entrys ...adapter.Entry, ) (hc *HelmContext, e error)
NewHelmContext
func (*HelmContext) NewHelmClient ¶
func (hc *HelmContext) NewHelmClient() (adapter.Adapter, error)
NewHelmClient
func (*HelmContext) NewHelmConifg ¶
func (hc *HelmContext) NewHelmConifg() (actionConfig *action.Configuration, e error)
NewHelmConifg create helm config by kubeconfig
func (*HelmContext) NewHelmSettings ¶
func (hc *HelmContext) NewHelmSettings() (settings *cli.EnvSettings)
NewHelmSettings create setting we need to create helm action
func (*HelmContext) UpdateRepo ¶
func (hc *HelmContext) UpdateRepo(entrys ...adapter.Entry) error
UpdateRepo same as command `helm repo update`
type KubeNamespaceRequest ¶
type KubeNamespaceRequest interface {
GetNamespace() string
}
type TemporaryContext ¶
type TemporaryContext struct { Name string Cancel func() }
type TemporaryContextRequest ¶
type TemporaryContextRequest interface { TemporaryRepoRequest TemporaryKubeRequest }
type TemporaryKubeRequest ¶
type TemporaryRepoRequest ¶
type WithHelmContextOpt ¶
type WithHelmContextOpt func(hc *HelmContext)
func WithHelmContextNamespace ¶
func WithHelmContextNamespace(namespace string) WithHelmContextOpt
func WithHelmContextNamespaceOpts ¶
func WithHelmContextNamespaceOpts(r interface{}) WithHelmContextOpt
Click to show internal directories.
Click to hide internal directories.