install

package
v1.16.10 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: Apache-2.0 Imports: 48 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GlooEHelmRepoTemplate = "https://storage.googleapis.com/gloo-ee-helm/charts/gloo-ee-%s.tgz"
)

Variables

View Source
var (
	GlooAlreadyInstalled = func(namespace string) error {
		return eris.Errorf("Gloo has already been installed to namespace %s", namespace)
	}
	NoReleaseForCRDs        = eris.New("Could not find a release from which to pull CRDs")
	MultipleReleasesForCRDs = eris.New("Found multiple releases from which to pull CRDs")
)
View Source
var (
	// ChartAndReleaseFlagErr is thrown when both options are set.
	ChartAndReleaseFlagErr = func(chartOverride, versionOverride string) error {
		return eris.Errorf("you may not specify both a chart with -f and a release version with --version. Received: %s and %s", chartOverride, versionOverride)
	}
	// UnreleasedWithoutOverrideErr details that the user is running an unreleased or invalid verison of gloo.
	UnreleasedWithoutOverrideErr = eris.Errorf("you must provide a Gloo Helm chart URI via the 'file' option " +
		"when running an unreleased version of glooctl")
)
View Source
var (
	GlooNamespacedKinds    []string
	GlooClusterScopedKinds []string
	GlooCrdNames           []string
	GlooComponentLabels    map[string]string
)

Functions

func InstallCmd

func InstallCmd(opts *options.Options, optionsFunc ...cliutils.OptionsFunc) *cobra.Command

func LabelsToFlagString added in v1.2.11

func LabelsToFlagString(labelMap map[string]string) (labelString string)

func NewCLISettings added in v1.2.3

func NewCLISettings(namespace, context string) *cli.EnvSettings

Build a Helm EnvSettings struct basically, abstracted cli.New() into our own function call because of the weirdness described in the big comment below

func RenderKnativeManifests added in v0.17.0

func RenderKnativeManifests(opts options.Knative) (string, error)

used by e2e test

func RenderKnativeValues added in v1.2.0

func RenderKnativeValues(version string) (string, error)

func Uninstall added in v1.5.0

func Uninstall(opts *options.Options, cli install.KubeCli, mode Mode) error

func UninstallCmd

func UninstallCmd(opts *options.Options, optionsFunc ...cliutils.OptionsFunc) *cobra.Command

Types

type HelmClient added in v1.2.0

type HelmClient interface {
	// Prepare an installation object that can then be .Run() with a chart object
	NewInstall(namespace, releaseName string, dryRun bool, context string) (HelmInstallation, *cli.EnvSettings, error)

	// Prepare an un-installation object that can then be .Run() with a release name
	NewUninstall(namespace string) (HelmUninstallation, error)

	// List the already-existing releases in the given namespace
	ReleaseList(namespace string) (HelmReleaseListRunner, error)

	// Returns the Helm chart archive located at the given URI (can be either an http(s) address or a file path)
	DownloadChart(chartArchiveUri string) (*chart.Chart, error)

	// Returns true if the release with the given name exists in the given namespace
	ReleaseExists(namespace, releaseName string) (releaseExists bool, err error)
}

This interface implements the Helm CLI actions. The implementation relies on the Helm 3 libraries.

func DefaultHelmClient added in v1.2.0

func DefaultHelmClient() HelmClient

a HelmClient that talks to the kube api server and creates resources

type HelmInstallation added in v1.2.0

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

an interface around Helm's action.Install struct

type HelmReleaseListRunner added in v1.2.0

type HelmReleaseListRunner interface {
	Run() ([]*release.Release, error)
	SetFilter(filter string)
}

an interface around Helm's action.List struct

type HelmUninstallation added in v1.2.0

type HelmUninstallation interface {
	Run(name string) (*release.UninstallReleaseResponse, error)
}

an interface around Helm's action.Uninstall struct

type Installer added in v1.2.0

type Installer interface {
	Install(installerConfig *InstallerConfig) error
}

func NewInstaller added in v1.2.0

func NewInstaller(opts *options.Options, helmClient HelmClient) Installer

NewInstaller consumes a helm client and sets up an installer for usage in glooctl.

func NewInstallerWithWriter added in v1.2.0

func NewInstallerWithWriter(helmClient HelmClient, kubeNsClient v1.NamespaceInterface, outputWriter io.Writer) Installer

NewInstallerWithWriter creates a new Installer for a given helm client, namespace and output writer. The extra variables are exposed to allow for ease of testing.

type InstallerConfig added in v1.2.0

type InstallerConfig struct {
	InstallCliArgs *options.Install
	ExtraValues    map[string]interface{}
	Mode           Mode
	Verbose        bool
	Ctx            context.Context
}

type Mode added in v1.5.0

type Mode int
const (
	Gloo Mode = iota
	GlooWithUI
	Enterprise
	Federation
)

type Uninstaller added in v1.2.0

type Uninstaller interface {
	Uninstall(ctx context.Context, cliArgs *options.HelmUninstall, mode Mode) error
}

func NewUninstaller added in v1.2.0

func NewUninstaller(helmClient HelmClient, kubeCli install.KubeCli) Uninstaller

func NewUninstallerWithOutput added in v1.2.0

func NewUninstallerWithOutput(helmClient HelmClient, kubeCli install.KubeCli, output io.Writer) Uninstaller

visible for testing

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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