Documentation
¶
Index ¶
- Constants
- func HandleSettingChartValuesForInstall(step InstallStep, cmd *exec.Cmd) []string
- func HandleSettingChartValuesForUpgrade(step UpgradeStep, cmd *exec.Cmd) []string
- type Action
- type BuildInput
- type ExecuteStep
- type ExecuteSteps
- type HelmOutput
- type InstallAction
- type InstallArguments
- type InstallStep
- type Mixin
- func (m *Mixin) Build(ctx context.Context) error
- func (m *Mixin) Execute(ctx context.Context) error
- func (m *Mixin) GetSchema() string
- func (m *Mixin) Install(ctx context.Context) error
- func (m *Mixin) PrintSchema() error
- func (m *Mixin) PrintVersion(opts version.Options) error
- func (m *Mixin) Uninstall(ctx context.Context) error
- func (m *Mixin) Upgrade(ctx context.Context) error
- func (m *Mixin) ValidatePayload(b []byte) error
- type MixinConfig
- type Repository
- type Step
- type TestMixin
- type UninstallAction
- type UninstallArguments
- type UninstallStep
- type UpgradeAction
- type UpgradeArguments
- type UpgradeStep
Constants ¶
const MockHelmClientVersion string = "v3.8.2"
Variables ¶
This section is empty.
Functions ¶
func HandleSettingChartValuesForInstall ¶ added in v0.1.13
func HandleSettingChartValuesForInstall(step InstallStep, cmd *exec.Cmd) []string
Prepare set arguments
func HandleSettingChartValuesForUpgrade ¶ added in v0.1.13
func HandleSettingChartValuesForUpgrade(step UpgradeStep, cmd *exec.Cmd) []string
Prepare set arguments
Types ¶
type Action ¶
type Action struct {
// Name of the action: install, upgrade, invoke, uninstall.
Name string
Steps []ExecuteSteps // 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 ¶ added in v1.0.0
func (a Action) MakeSteps() interface{}
MakeSteps builds a slice of Steps for data to be unmarshaled into.
func (Action) MarshalYAML ¶ added in v1.0.0
MarshalYAML converts the action back to a YAML representation install:
exec: ... helm3: ...
func (*Action) UnmarshalYAML ¶
UnmarshalYAML takes any yaml in this form ACTION: - helm3: ... 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 ExecuteStep ¶
type ExecuteStep struct {
Step `yaml:",inline"`
Namespace string `yaml:"namespace,omitempty"`
Arguments []string `yaml:"arguments,omitempty"`
Flags builder.Flags `yaml:"flags,omitempty"`
}
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
func (ExecuteStep) GetWorkingDir ¶ added in v1.0.0
func (s ExecuteStep) GetWorkingDir() string
type ExecuteSteps ¶
type ExecuteSteps struct {
ExecuteStep `yaml:"helm3"`
}
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"`
Devel bool `yaml:"devel"`
NoHooks bool `yaml:"noHooks"`
Repo string `yaml:"repo"`
Set map[string]string `yaml:"set"`
SkipCrds bool `yaml:"skipCrds"`
Password string `yaml:"password"`
Username string `yaml:"username"`
Values []string `yaml:"values"`
Version string `yaml:"version"`
Wait bool `yaml:"wait"`
Timeout string `yaml:"timeout"`
Debug bool `yaml:"debug"`
Atomic *bool `yaml:"atomic,omitempty"`
}
type InstallStep ¶
type InstallStep struct {
InstallArguments `yaml:"helm3"`
}
type Mixin ¶
type Mixin struct {
runtime.RuntimeConfig
ClientFactory kubernetes.ClientFactory
HelmClientVersion string
HelmClientPlatform string
HelmClientArchitecture string
}
Helm is the logic behind the helm mixin
func (*Mixin) Build ¶
Build will generate the necessary Dockerfile lines for an invocation image using this mixin
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"`
ClientPlatform string `yaml:"clientPlatform,omitempty"`
ClientArchitecture string `yaml:"clientArchitecture,omitempty"`
Repositories map[string]Repository `yaml:"repositories,omitempty"`
}
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 *portercontext.TestContext
}
func NewTestMixin ¶
NewTestMixin initializes a mixin test client, with the output buffered, and an in-memory file system.
type UninstallAction ¶
type UninstallAction struct {
Steps []UninstallStep `yaml:"uninstall"`
}
type UninstallArguments ¶
type UninstallArguments struct {
Step `yaml:",inline"`
Namespace string `yaml:"namespace,omitempty"`
Releases []string `yaml:"releases"`
NoHooks bool `yaml:"noHooks"`
Wait bool `yaml:"wait"`
Timeout string `yaml:"timeout"`
Debug bool `yaml:"debug"`
}
UninstallArguments are the arguments available for the Uninstall action
type UninstallStep ¶
type UninstallStep struct {
UninstallArguments `yaml:"helm3"`
}
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"`
NoHooks bool `yaml:"nohooks"`
Set map[string]string `yaml:"set"`
Values []string `yaml:"values"`
Wait bool `yaml:"wait"`
ResetValues bool `yaml:"resetValues"`
ReuseValues bool `yaml:"reuseValues"`
Repo string `yaml:"repo"`
SkipCrds bool `yaml:"skipCrds"`
Password string `yaml:"password"`
Username string `yaml:"username"`
Timeout string `yaml:"timeout"`
Debug bool `yaml:"debug"`
Atomic *bool `yaml:"atomic,omitempty"`
}
UpgradeArguments represent the arguments available to the Upgrade step
type UpgradeStep ¶
type UpgradeStep struct {
UpgradeArguments `yaml:"helm3"`
}
UpgradeStep represents the structure of an Upgrade step