helmutils

package
v1.18.0-beta6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChartName = "gloo"

	ChartRepositoryUrl     = "https://storage.googleapis.com/solo-public-helm"
	PrChartRepositoryUrl   = "https://storage.googleapis.com/solo-public-tagged-helm"
	RemoteChartUriTemplate = "https://storage.googleapis.com/solo-public-helm/charts/gloo-%s.tgz"
	RemoteChartName        = "gloo/gloo"
)

Variables

This section is empty.

Functions

func GetRemoteChartUri

func GetRemoteChartUri(version string) string

Types

type Client

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

Client is a utility for executing `helm` commands

func NewClient

func NewClient() *Client

NewClient returns an implementation of the helmutils.Client

func (*Client) AddGlooRepository

func (c *Client) AddGlooRepository(ctx context.Context, extraArgs ...string) error

func (*Client) AddPrGlooRepository

func (c *Client) AddPrGlooRepository(ctx context.Context, extraArgs ...string) error

func (*Client) AddRepository

func (c *Client) AddRepository(ctx context.Context, chartName string, chartUrl string, extraArgs ...string) error

func (*Client) Command

func (c *Client) Command(ctx context.Context, args ...string) cmdutils.Cmd

Command returns a Cmd that executes kubectl command, including the --context if it is defined The Cmd sets the Stdout and Stderr to the receiver of the Cli

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, extraArgs ...string) error

func (*Client) Install

func (c *Client) Install(ctx context.Context, extraArgs ...string) error

func (*Client) InstallGloo

func (c *Client) InstallGloo(ctx context.Context, installOpts InstallOpts, extraArgs ...string) error

func (*Client) RunCommand

func (c *Client) RunCommand(ctx context.Context, args ...string) error

RunCommand creates a Cmd and then runs it

func (*Client) WithNamespace

func (c *Client) WithNamespace(ns string) *Client

WithNamespace sets the namespace that all commands will be invoked against

func (*Client) WithReceiver

func (c *Client) WithReceiver(receiver io.Writer) *Client

WithReceiver sets the io.Writer that will be used by default for the stdout and stderr of cmdutils.Cmd created by the Client

type InstallOpts

type InstallOpts struct {
	// KubeContext is the kubernetes context to use.
	KubeContext string

	// Namespace is the namespace to which the release will be installed.
	Namespace string
	// CreateNamespace controls whether to create the namespace or error if it doesn't exist.
	CreateNamespace bool

	// ValuesFile is the path to the YAML values for the installation.
	ValuesFile string

	// ReleaseName is the name of the release to install. Usually will be "gloo".
	ReleaseName string

	// Repository is the remote repo to use. Usually will be one of the constants exported
	// from this package. Ignored if LocalChartPath is set.
	Repository string

	// ChartName is the name of the chart to use. Usually will be "gloo". Ignored if LocalChartPath is set.
	ChartName string

	// LocalChartPath is the path to a locally built tarballed chart to install
	LocalChartPath string
}

InstallOpts is a set of typical options for a helm install which can be passed in instead of requiring the caller to remember the helm cli flags. extraArgs should always be accepted and respected when using InstallOpts.

Jump to

Keyboard shortcuts

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