action

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timestamper = time.Now

Timestamper is a function capable of producing a timestamp.Timestamper.

By default, this is a time.Time function from the Helm time package. This can be overridden for testing though, so that timestamps are predictable.

Functions

func CheckDependencies

func CheckDependencies(ch *chart.Chart, reqs []*chart.Dependency) error

CheckDependencies checks the dependencies for a chart. by wrapping action.CheckDependencies

Types

type Configuration

type Configuration struct {
	*action.Configuration
}

Configuration is a composite type of Helm's Configuration type

func (*Configuration) SetNamespace

func (c *Configuration) SetNamespace(namespace string)

SetNamespace sets the namespace on the kubeclient

type History added in v0.0.2

type History struct {
	*action.History
	// contains filtered or unexported fields
}

History is the action for checking the release's ledger.

It provides the implementation of 'helm history'. It returns all the revisions for a specific release. To list up to one revision of every release in one specific, or in all, namespaces, see the List action.

func NewHistory added in v0.0.2

func NewHistory(cfg *Configuration) *History

NewHistory creates a new History object with the given configuration.

type Install

type Install struct {
	*action.Install

	// Config stores the actionconfig so it can be retrieved and used again
	Config *Configuration
}

Install is a composite type of Helm's Install type

func NewInstall

func NewInstall(cfg *Configuration) *Install

NewInstall creates a new Install object with the given configuration, by wrapping action.NewInstall

func (*Install) Chart

func (i *Install) Chart(args []string) (string, error)

Chart returns the chart that should be used.

This will read the flags and skip args if necessary.

func (*Install) Name

func (i *Install) Name(chart *chart.Chart, args []string) (string, error)

Name returns the name that should be used.

This will read the flags and handle name generation if necessary.

func (*Install) NameAndChart

func (i *Install) NameAndChart(args []string) (string, string, error)

NameAndChart overloads Helm's NameAndChart. It always fails.

On Hypper, we need to read the chart annotations to know the correct release name. Therefore, it cannot happen in this function.

func (*Install) Run

func (i *Install) Run(chrt *chart.Chart, vals map[string]interface{}) (*release.Release, error)

Run executes the installation

If DryRun is set to true, this will prepare the release, but not install it

func (*Install) SetNamespace

func (i *Install) SetNamespace(chart *chart.Chart, defaultns string)

SetNamespace sets the Namespace that should be used in action.Install

This will read the chart annotations. If no annotations, it leave the existing ns in the action.

type List

type List struct {
	*action.List
	// contains filtered or unexported fields
}

List is a composite type of Helm's List type

func NewList

func NewList(cfg *Configuration) *List

NewList constructs a new *List by embedding helm/pkg/action.List

type SharedDependency added in v0.0.2

type SharedDependency struct {
	*action.Dependency

	// hypper specific:
	Namespace string
	Config    *Configuration
}

SharedDependency is the action for building a given chart's shared dependency tree.

It provides the implementation of 'hypper shared-dependency' and its respective subcommands.

func NewSharedDependency added in v0.0.2

func NewSharedDependency(cfg *Configuration) *SharedDependency

NewSharedDependency creates a new SharedDependency object with the given configuration.

func (*SharedDependency) List added in v0.0.2

func (d *SharedDependency) List(chartpath string, logger log.Logger) error

List executes 'hypper shared-dep list'.

func (*SharedDependency) SetNamespace added in v0.0.2

func (d *SharedDependency) SetNamespace(chart *chart.Chart, defaultns string)

SetNamespace sets the Namespace that should be used in action.SharedDependency

This will read the chart annotations. If no annotations, it leave the existing ns in the action.

func (*SharedDependency) SharedDependencyStatus added in v0.0.2

func (d *SharedDependency) SharedDependencyStatus(dep *chart.Dependency, releases []*release.Release) string

SharedDependencyStatus returns a string describing the status of a dependency viz a viz the releases in context.

type Status

type Status struct {
	*action.Status
	// contains filtered or unexported fields
}

Status is the action for checking the deployment status of releases.

It provides the implementation of 'helm status'.

func NewStatus

func NewStatus(cfg *Configuration) *Status

NewStatus creates a new Status object with the given configuration.

type Uninstall

type Uninstall struct {
	*action.Uninstall
	Config *Configuration
}

Uninstall is a composite type of Helm's Uninstall type

func NewUninstall

func NewUninstall(cfg *Configuration) *Uninstall

NewUninstall creates a new Uninstall by embedding action.Uninstall

type Upgrade added in v0.0.2

type Upgrade struct {
	*action.Upgrade
	Config      *Configuration
	ReleaseName string
}

Upgrade is a composite type of Helm's Upgrade type

func NewUpgrade added in v0.0.2

func NewUpgrade(cfg *Configuration) *Upgrade

NewUpgrade creates a new Upgrade object with the given configuration.

func (*Upgrade) Name added in v0.0.2

func (i *Upgrade) Name(chart *chart.Chart) (string, error)

Name returns the name that should be used.

func (*Upgrade) SetNamespace added in v0.0.2

func (i *Upgrade) SetNamespace(chart *chart.Chart, defaultns string)

SetNamespace sets the Namespace that should be used in action.Upgrade

This will read the chart annotations. If no annotations, it leave the existing ns in the action.

Jump to

Keyboard shortcuts

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