stack

package
v0.20.8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Docker

type Docker interface {
	CheckContainerExistence(ctx context.Context, name string) (bool, error)
	ForceRemove(ctx context.Context, name string) error
	Run(ctx context.Context, image string, name string, cmd []string, flags ...string) error
}

type Helm

type Helm interface {
	RegistryLogin(ctx context.Context, endpoint, username, password string) error
	UpgradeInstallChartWithValuesFile(ctx context.Context, chart, ociURI, version, kubeconfigFilePath, namespace, valuesFilePath string, opts ...helm.Opt) error
	Uninstall(ctx context.Context, chart, kubeconfigFilePath, namespace string, opts ...helm.Opt) error
	ListCharts(ctx context.Context, kubeconfigFilePath, filter string) ([]string, error)
}

type InstallOption

type InstallOption func(s *Installer)

func WithBootsOnDocker

func WithBootsOnDocker() InstallOption

WithBootsOnDocker is an InstallOption to run Boots as a Docker container.

func WithBootsOnKubernetes

func WithBootsOnKubernetes() InstallOption

WithBootsOnKubernetes is an InstallOption to run Boots as a Kubernetes deployment.

func WithDHCPRelayEnabled added in v0.20.0

func WithDHCPRelayEnabled(enabled bool) InstallOption

WithDHCPRelayEnabled is an InstallOption that allows you to enable DHCP Relay.

func WithHostNetworkEnabled added in v0.20.0

func WithHostNetworkEnabled(enabled bool) InstallOption

WithHostNetworkEnabled is an InstallOption that allows you to enable/disable host network for Tinkerbell deployments.

func WithLoadBalancerEnabled added in v0.12.0

func WithLoadBalancerEnabled(enabled bool) InstallOption

WithLoadBalancerEnabled is an InstallOption that allows you to setup a LoadBalancer to expose hegel and tink-server.

func WithStackServiceEnabled added in v0.20.0

func WithStackServiceEnabled(enabled bool) InstallOption

WithStackServiceEnabled is an InstallOption that allows you to enable the nginx service as a reverse proxy.

type Installer

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

func (*Installer) AddNoProxyIP added in v0.16.0

func (s *Installer) AddNoProxyIP(IP string)

AddNoProxyIP is for workload cluster upgrade, we have to pass controlPlaneEndpoint IP of managemement cluster if proxy is configured.

func (*Installer) CleanupLocalBoots

func (s *Installer) CleanupLocalBoots(ctx context.Context, remove bool) error

CleanupLocalBoots determines whether Boots is already running locally and either cleans it up or errors out depending on the `remove` flag.

func (*Installer) GetNamespace added in v0.15.0

func (s *Installer) GetNamespace() string

GetNamespace retrieves the namespace the installer is using for stack deployment.

func (*Installer) HasLegacyChart added in v0.20.0

func (s *Installer) HasLegacyChart(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string) (bool, error)

HasLegacyChart returns whether or not the legacy tinkerbell-chart exists on the cluster.

func (*Installer) Install

func (s *Installer) Install(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride string, opts ...InstallOption) error

Install installs the Tinkerbell stack on a target cluster using a helm chart and providing the necessary values overrides.

func (*Installer) Uninstall added in v0.20.0

func (s *Installer) Uninstall(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string) error

Uninstall uninstalls a tinkerbell chart of a certain name.

func (*Installer) UninstallLocal

func (s *Installer) UninstallLocal(ctx context.Context) error

UninstallLocal currently removes local docker container running Boots.

func (*Installer) Upgrade added in v0.15.0

func (s *Installer) Upgrade(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig string, hookOverride string, opts ...InstallOption) error

Upgrade the Tinkerbell stack using images specified in bundle.

func (*Installer) UpgradeInstallCRDs added in v0.20.0

func (s *Installer) UpgradeInstallCRDs(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string, opts ...InstallOption) error

UpgradeInstallCRDs the Tinkerbell CRDs using images specified in bundle.

func (*Installer) UpgradeLegacy added in v0.20.0

func (s *Installer) UpgradeLegacy(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string, opts ...InstallOption) error

UpgradeLegacy upgrades the legacy Tinkerbell stack using images specified in bundle.

type StackInstaller

type StackInstaller interface {
	CleanupLocalBoots(ctx context.Context, forceCleanup bool) error
	Install(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride string, opts ...InstallOption) error
	UninstallLocal(ctx context.Context) error
	Uninstall(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string) error
	Upgrade(_ context.Context, _ releasev1alpha1.TinkerbellBundle, tinkerbellIP, kubeconfig, hookOverride string, opts ...InstallOption) error
	UpgradeInstallCRDs(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string, opts ...InstallOption) error
	UpgradeLegacy(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string, opts ...InstallOption) error
	AddNoProxyIP(IP string)
	GetNamespace() string
	HasLegacyChart(ctx context.Context, bundle releasev1alpha1.TinkerbellBundle, kubeconfig string) (bool, error)
}

StackInstaller deploys a Tinkerbell stack.

func NewInstaller

func NewInstaller(docker Docker, filewriter filewriter.FileWriter, helm Helm, namespace string, podCidrRange string, registryMirror *registrymirror.RegistryMirror, proxyConfig *v1alpha1.ProxyConfiguration) StackInstaller

NewInstaller returns a Tinkerbell StackInstaller which can be used to install or uninstall the Tinkerbell stack.

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