Documentation ¶
Index ¶
- Constants
- Variables
- func InstallCmd(opts *options.Options, optionsFunc ...cliutils.OptionsFunc) *cobra.Command
- func LabelsToFlagString(labelMap map[string]string) (labelString string)
- func NewCLISettings(namespace, context string) *cli.EnvSettings
- func RenderKnativeManifests(opts options.Knative) (string, error)
- func RenderKnativeValues(version string) (string, error)
- func Uninstall(opts *options.Options, cli install.KubeCli, mode Mode) error
- func UninstallCmd(opts *options.Options, optionsFunc ...cliutils.OptionsFunc) *cobra.Command
- type HelmClient
- type HelmInstallation
- type HelmReleaseListRunner
- type HelmUninstallation
- type Installer
- type InstallerConfig
- type Mode
- type Uninstaller
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 = 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 = eris.Errorf("you must provide a Gloo Helm chart URI via the 'file' option " + "when running an unreleased version of glooctl") )
Functions ¶
func InstallCmd ¶
func LabelsToFlagString ¶ added in v1.2.11
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
used by e2e test
func RenderKnativeValues ¶ added in v1.2.0
func UninstallCmd ¶
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
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(helmClient HelmClient) Installer
func NewInstallerWithWriter ¶ added in v1.2.0
func NewInstallerWithWriter(helmClient HelmClient, kubeNsClient v1.NamespaceInterface, outputWriter io.Writer) Installer
visible for testing
type InstallerConfig ¶ added in v1.2.0
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.