helm

package
v0.0.0-...-887dc56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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 ContextGC

func ContextGC()

func DelHelmContext

func DelHelmContext(helmContextName string) error

DelHelmContext

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 TemporaryKubeRequest interface {
	GetKubeinfo() *protos.KubeInfo
}

type TemporaryRepoRequest

type TemporaryRepoRequest interface {
	GetRepoinfo() *protos.RepoInfo
}

type WithHelmContextOpt

type WithHelmContextOpt func(hc *HelmContext)

func WithHelmContextNamespace

func WithHelmContextNamespace(namespace string) WithHelmContextOpt

func WithHelmContextNamespaceOpts

func WithHelmContextNamespaceOpts(r interface{}) WithHelmContextOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL