helm

package
v0.8.11 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertNone added in v0.6.0

func ConvertNone(data []byte) (string, error)

ConvertNone converts the marshaled data into no type in order to return logs

func ConvertRelease added in v0.6.0

func ConvertRelease(data []byte) (*release.Release, string, error)

ConvertRelease converts the marshaled data to a typed release

func ConvertUninstallReleaseResponse added in v0.6.0

func ConvertUninstallReleaseResponse(data []byte) (*release.UninstallReleaseResponse, string, error)

ConvertUninstallReleaseResponse converts the marshaled data to a typed uninstall response

Types

type Agent

type Agent interface {
	Install(args *Args) (*Result, error)
	Rollback(args *Args) (*Result, error)
	Test(args *Args) (*Result, error)
	Uninstall(args *Args) (*Result, error)
	Upgrade(args *Args) (*Result, error)
}

Agent is the interface we use to talk to helm packages

type AgentAction added in v0.6.0

type AgentAction string

AgentAction is an enum/alias to make calling methods typed

const (
	// Install represents the Install method
	Install AgentAction = "Install"

	// Rollback represents the Rollback method
	Rollback AgentAction = "Rollback"

	// Test represents the Test method
	Test AgentAction = "Test"

	// Uninstall represents the Uninstall method
	Uninstall AgentAction = "Uninstall"

	// Upgrade represents the Upgrade method
	Upgrade AgentAction = "Upgrade"
)

type Args added in v0.4.0

type Args struct {
	Name        string
	Namespace   string
	Chart       []byte
	Values      map[string]interface{}
	Version     int
	Wait        bool
	Timeout     string
	Install     bool
	ReuseValues bool
}

Args are arguments common to all commands

func ConvertArgs added in v0.6.0

func ConvertArgs(data []byte) (*Args, error)

ConvertArgs converts byte data back to args

type DefaultAgent

type DefaultAgent struct {
	// contains filtered or unexported fields
}

DefaultAgent is the default implementation of the Agent interface

func NewDefaultAgent added in v0.6.0

func NewDefaultAgent(kubeFunc func() (*rest.Config, error)) *DefaultAgent

NewDefaultAgent inits the default agent with the specified kube interface

func (DefaultAgent) Install added in v0.4.0

func (a DefaultAgent) Install(args *Args) (*Result, error)

Install is the equivalent of `helm install`

func (DefaultAgent) Rollback added in v0.4.0

func (a DefaultAgent) Rollback(args *Args) (*Result, error)

Rollback is the equivalent of `helm rollback`

func (DefaultAgent) Test added in v0.4.0

func (a DefaultAgent) Test(args *Args) (*Result, error)

Test is the equivalent of `helm test`

func (DefaultAgent) Uninstall added in v0.4.0

func (a DefaultAgent) Uninstall(args *Args) (*Result, error)

Uninstall is the equivalent of `helm uninstall`

func (DefaultAgent) Upgrade added in v0.4.0

func (a DefaultAgent) Upgrade(args *Args) (*Result, error)

Upgrade is the equivalent of `helm upgrade`

type Result added in v0.6.0

type Result struct {
	Data interface{}
	Logs string
	Type ResultType
}

Result is the type this agent returns

type ResultType added in v0.6.0

type ResultType string

ResultType represents types to convert for this response

const (
	// NoneResult represents helm commands that don't return anything, such as rollback
	NoneResult ResultType = "NoneResult"

	// ReleaseResult represents a Release result
	ReleaseResult ResultType = "ReleaseResult"

	// UninstallReleaseResponseResult represents an UninstallReleaseResponse result
	UninstallReleaseResponseResult ResultType = "UninstallReleaseResponse"
)

type ResultTypeError added in v0.6.0

type ResultTypeError struct{}

ResultTypeError is an eror when the wrong type conversion is made with a result

func (ResultTypeError) Error added in v0.6.0

func (err ResultTypeError) Error() string

Jump to

Keyboard shortcuts

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