Documentation ¶
Index ¶
- Constants
- type Action
- type BuildInput
- type ExecuteInstruction
- type ExecuteStep
- type HelmOutput
- type InstallAction
- type InstallArguments
- type InstallStep
- type Mixin
- func (m *Mixin) Build() error
- func (m *Mixin) Execute() error
- func (m *Mixin) GetSchema() (string, error)
- func (m *Mixin) Init() error
- func (m *Mixin) Install() error
- func (m *Mixin) PrintSchema() error
- func (m *Mixin) PrintVersion(opts version.Options) error
- func (m *Mixin) Uninstall() error
- func (m *Mixin) Upgrade() error
- func (m *Mixin) ValidatePayload(b []byte) error
- type MixinConfig
- type MockTillerIniter
- type RealTillerIniter
- type Repository
- type Step
- type TestMixin
- type TillerIniter
- type UninstallAction
- type UninstallArguments
- type UninstallStep
- type UpgradeAction
- type UpgradeArguments
- type UpgradeStep
Constants ¶
const MockHelmClientVersion string = "v2.17.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string Steps []ExecuteStep // using UnmarshalYAML so that we don't need a custom type per action }
func (Action) GetSteps ¶
func (a Action) GetSteps() []builder.ExecutableStep
func (Action) MakeSteps ¶
func (a Action) MakeSteps() interface{}
MakeSteps builds a slice of Steps for data to be unmarshaled into.
func (Action) MarshalYAML ¶
MarshalYAML converts the action back to a YAML representation install:
exec: ... helm2: ...
func (*Action) UnmarshalYAML ¶
UnmarshalYAML takes any yaml in this form ACTION: - helm2: ... and puts the steps into the Action.Steps field
type BuildInput ¶
type BuildInput struct {
Config MixinConfig
}
BuildInput represents stdin passed to the mixin for the build command.
type ExecuteInstruction ¶
type ExecuteStep ¶
type ExecuteStep struct {
ExecuteInstruction `yaml:"helm2"`
}
func (ExecuteStep) GetArguments ¶
func (s ExecuteStep) GetArguments() []string
func (ExecuteStep) GetCommand ¶
func (s ExecuteStep) GetCommand() string
func (ExecuteStep) GetFlags ¶
func (s ExecuteStep) GetFlags() builder.Flags
type HelmOutput ¶
type HelmOutput struct { Name string `yaml:"name"` Secret string `yaml:"secret,omitempty"` Key string `yaml:"key,omitempty"` ResourceType string `yaml:"resourceType,omitempty"` ResourceName string `yaml:"resourceName,omitempty"` Namespace string `yaml:"namespace,omitempty"` JSONPath string `yaml:"jsonPath,omitempty"` }
type InstallAction ¶
type InstallAction struct {
Steps []InstallStep `yaml:"install"`
}
type InstallArguments ¶
type InstallArguments struct { Step `yaml:",inline"` Namespace string `yaml:"namespace"` Name string `yaml:"name"` Chart string `yaml:"chart"` Version string `yaml:"version"` Replace bool `yaml:"replace"` Set map[string]string `yaml:"set"` Values []string `yaml:"values"` Devel bool `yaml:"devel` Wait bool `yaml:"wait"` }
type InstallStep ¶
type InstallStep struct {
InstallArguments `yaml:"helm2"`
}
type Mixin ¶
type Mixin struct { *context.Context ClientFactory kubernetes.ClientFactory TillerIniter HelmClientVersion string // contains filtered or unexported fields }
Helm is the logic behind the helm2 mixin
func (*Mixin) Init ¶
Init inits the Helm server (Tiller) if not running, else, ensures the Helm client matches the installed Tiller version
func (*Mixin) PrintSchema ¶
func (*Mixin) Uninstall ¶
Uninstall deletes a provided set of Helm releases, supplying optional flags/params
func (*Mixin) Upgrade ¶
Upgrade issues a helm upgrade command for a release using the provided UpgradeArguments
func (*Mixin) ValidatePayload ¶
type MixinConfig ¶
type MixinConfig struct { ClientVersion string `yaml:"clientVersion,omitempty"` Repositories map[string]Repository }
type MockTillerIniter ¶
type MockTillerIniter struct { GetTillerVersion func(m *Mixin) (string, error) SetupTillerRBAC func(m *Mixin) error RunRBACResourceCmd func(m *Mixin, cmd *exec.Cmd) error InstallHelmClient func(m *Mixin, version string) error }
func NewMockTillerIniter ¶
func NewMockTillerIniter() MockTillerIniter
type RealTillerIniter ¶
type RealTillerIniter struct{}
RealTillerIniter implements the TillerIniter interface, in REAL life
type Repository ¶
type Repository struct {
URL string `yaml:"url,omitempty"`
}
type Step ¶
type Step struct { Description string `yaml:"description"` Outputs []HelmOutput `yaml:"outputs,omitempty"` }
type TestMixin ¶
type TestMixin struct { *Mixin TestContext *context.TestContext }
func NewTestMixin ¶
NewTestMixin initializes a helm2 mixin, with the output buffered, and an in-memory file system.
type TillerIniter ¶
type TillerIniter interface {
// contains filtered or unexported methods
}
TillerIniter is an interface for methods associated with Tiller interactions
type UninstallAction ¶
type UninstallAction struct {
Steps []UninstallStep `yaml:"uninstall"`
}
type UninstallArguments ¶
type UninstallArguments struct { Step `yaml:",inline"` Releases []string `yaml:"releases"` Purge bool `yaml:"purge"` }
UninstallArguments are the arguments available for the Uninstall action
type UninstallStep ¶
type UninstallStep struct {
UninstallArguments `yaml:"helm2"`
}
UninstallStep represents the structure of an Uninstall action
type UpgradeAction ¶
type UpgradeAction struct {
Steps []UpgradeStep `yaml:"upgrade"`
}
type UpgradeArguments ¶
type UpgradeArguments struct { Step `yaml:",inline"` Namespace string `yaml:"namespace"` Name string `yaml:"name"` Chart string `yaml:"chart"` Version string `yaml:"version"` Set map[string]string `yaml:"set"` Values []string `yaml:"values"` Wait bool `yaml:"wait"` ResetValues bool `yaml:"resetValues"` ReuseValues bool `yaml:"reuseValues"` }
UpgradeArguments represent the arguments available to the Upgrade step
type UpgradeStep ¶
type UpgradeStep struct {
UpgradeArguments `yaml:"helm2"`
}
UpgradeStep represents the structure of an Upgrade step