helm3

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT, Unlicense Imports: 27 Imported by: 0

Documentation

Overview

go:generate packr2

Index

Constants

View Source
const MockHelmClientVersion string = "v3.6.3"

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 {
	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) UnmarshalYAML

func (a *Action) UnmarshalYAML(unmarshal func(interface{}) error) error

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

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"`
	Version   string            `yaml:"version"`
	Replace   bool              `yaml:"replace"`
	Set       map[string]string `yaml:"set"`
	Values    []string          `yaml:"values"`
	Devel     bool              `yaml:"devel`
	UpSert    bool              `yaml:"upsert`
	Wait      bool              `yaml:"wait"`
}

type InstallStep

type InstallStep struct {
	InstallArguments `yaml:"helm3"`
}

type Mixin

type Mixin struct {
	*context.Context

	ClientFactory          kubernetes.ClientFactory
	HelmClientVersion      string
	HelmClientPlatfrom     string
	HelmClientArchitecture string
	// contains filtered or unexported fields
}

Helm is the logic behind the helm mixin

func New

func New() *Mixin

New helm mixin client, initialized with useful defaults.

func (*Mixin) Build

func (m *Mixin) Build() error

Build will generate the necessary Dockerfile lines for an invocation image using this mixin

func (*Mixin) Execute

func (m *Mixin) Execute() error

func (*Mixin) GetSchema

func (m *Mixin) GetSchema() (string, error)

func (*Mixin) Install

func (m *Mixin) Install() error

func (*Mixin) PrintSchema

func (m *Mixin) PrintSchema() error

func (*Mixin) PrintVersion

func (m *Mixin) PrintVersion(opts version.Options) error

func (*Mixin) Uninstall

func (m *Mixin) Uninstall() error

Uninstall deletes a provided set of Helm releases, supplying optional flags/params

func (*Mixin) Upgrade

func (m *Mixin) Upgrade() error

Upgrade issues a helm upgrade command for a release using the provided UpgradeArguments

func (*Mixin) ValidatePayload

func (m *Mixin) ValidatePayload(b []byte) error

type MixinConfig

type MixinConfig struct {
	ClientVersion      string `yaml:"clientVersion,omitempty"`
	ClientPlatfrom     string `yaml:"clientPlatfrom,omitempty"`
	ClientArchitecture string `yaml:"clientArchitecture,omitempty"`
	Repositories       map[string]Repository
}

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

func NewTestMixin(t *testing.T) *TestMixin

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"`
}

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"`
	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:"helm3"`
}

UpgradeStep represents the structure of an Upgrade step

Jump to

Keyboard shortcuts

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