helmbinary

package
v2.36.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsArgument

func IsArgument(err error) bool

IsArgument asserts argumentError.

func IsCommand

func IsCommand(err error) bool

IsCommand asserts CommandError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	Client client.Client
}

Config represent the input parameters that New takes to produce a valid helmbinary Service.

type Interface

type Interface interface {
	Pull(context.Context, PullOptions) (tmpDir string, err error)
}

Interface represents the contract for the helmbinary service. Using this instead of a regular 'struct' makes mocking the service in tests much simpler.

func New

func New(config Config) (Interface, error)

New returns a new helmbinary Service.

type PullOptions

type PullOptions struct {
	URL string
}

PullOptions are the parameters that the Pull method takes.

type Service

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

Service is the object we'll hang the helmbinary methods on.

func (*Service) Pull

func (s *Service) Pull(ctx context.Context, options PullOptions) (tmpDir string, err error)

Pull uses the helm binary to fetch a Chart and extract it to a temporary directory Why not just download it directly? There are actually a lot of little security details that go into unpacking this tarball. Checkout https://github.com/helm/helm/blob/master/pkg/chart/loader/archive.go#L101

Jump to

Keyboard shortcuts

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