helmx

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

helmx provides an API for other golang programs to use helm-x as a library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultRunCommand

func DefaultRunCommand(cmd string, args []string, stdout, stderr io.Writer, env map[string]string) error

func Namespace

func Namespace(ns string) *namespace

func TillerNamespace

func TillerNamespace(tillerNs string) *tillerNamespace

func TillerStorageBackend added in v0.6.0

func TillerStorageBackend(s string) *storage

func YamlMarshal

func YamlMarshal(v interface{}) ([]byte, error)

Types

type AdoptOption

type AdoptOption interface {
	SetAdoptOption(*AdoptOpts) error
}

type AdoptOpts

type AdoptOpts struct {
	*ClientOpts

	Namespace       string
	TillerNamespace string

	Out io.Writer
}

type ClientOpts

type ClientOpts struct {
	KubeContext string
	TLS         bool
	TLSCert     string
	TLSKey      string

	TillerStorageBackend string
}

type DiffOption

type DiffOption interface {
	SetDiffOption(*DiffOpts) error
}

type DiffOpts

type DiffOpts struct {
	*chartify.ChartifyOpts
	*ClientOpts

	Chart string

	AllowUnreleased  bool
	DetailedExitcode bool
	ResetValues      bool

	Out io.Writer
	// contains filtered or unexported fields
}

func (*DiffOpts) SetDiffOption

func (s *DiffOpts) SetDiffOption(o *DiffOpts) error

type KustomizeImage

type KustomizeImage struct {
	Name    string `yaml:"name"`
	NewName string `yaml:"newName"`
	NewTag  string `yaml:"newTag"`
	Digest  string `yaml:"digest"`
}

func (KustomizeImage) String

func (img KustomizeImage) String() string

type KustomizeOpts

type KustomizeOpts struct {
	Images     []KustomizeImage `yaml:"images"`
	NamePrefix string           `yaml:"namePrefix"`
	NameSuffix string           `yaml:"nameSuffix"`
	Namespace  string           `yaml:"namespace"`
}

type Option

type Option func(*Runner) error

func Commander

func Commander(c cmdsite.RunCommand) Option

func HelmBin added in v0.8.0

func HelmBin(b string) Option

func UseHelm3 added in v0.8.0

func UseHelm3(u bool) Option

type RenderOpts

type RenderOpts struct {
	*chartify.ChartifyOpts

	IncludeReleaseConfigmap bool
	IncludeReleaseSecret    bool

	Out io.Writer
}

type Runner

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

func New

func New(opts ...Option) *Runner

func (*Runner) Adopt

func (r *Runner) Adopt(release string, resources []string, pathOptions *clientcmd.PathOptions, opts ...AdoptOption) error

func (*Runner) CaptureBytes

func (r *Runner) CaptureBytes(binary string, args []string) ([]byte, []byte, error)

func (*Runner) Chartify

func (r *Runner) Chartify(release, dirOrChart string, opts ...chartify.ChartifyOption) (string, error)

func (*Runner) DeprecatedCaptureBytes

func (r *Runner) DeprecatedCaptureBytes(cmd string) ([]byte, []byte, error)

DeprecatedCaptureBytes takes a command as a string and executes it, and returns the captured stdout and stderr

func (*Runner) DeprecatedExec

func (r *Runner) DeprecatedExec(cmd string) error

DeprecatedExec takes a command as a string and executes it

func (*Runner) Diff

func (r *Runner) Diff(release, chart string, opts ...DiffOption) (bool, error)

Diff returns true when the diff succeeds and changes are detected.

func (*Runner) HelmBin added in v0.8.0

func (r *Runner) HelmBin() string

func (*Runner) IsHelm3 added in v0.8.0

func (r *Runner) IsHelm3() bool

func (*Runner) Render

func (r *Runner) Render(release, chart string, templateOpts RenderOpts) error

Render generates K8s manifests for the named release from the chart, and prints the resulting manifests to STDOUT

func (*Runner) Run

func (r *Runner) Run(name string, args ...string) (string, error)

func (*Runner) Upgrade

func (r *Runner) Upgrade(release, chart string, o UpgradeOpts) error

type UpgradeOpts

type UpgradeOpts struct {
	*chartify.ChartifyOpts
	*ClientOpts

	Timeout string
	Install bool
	DryRun  bool

	ResetValues bool

	Adopt []string

	Out io.Writer
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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