installer

package
v5.28.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package installer provides functionality for installing and uninstalling components.

This package defines the Installer interface and provides implementations for installing various Kubernetes components on clusters:

  • argocd: ArgoCD GitOps engine installation
  • cert-manager: Certificate management installation
  • cni: Container Network Interface installers (Cilium, Calico)
  • flux: Flux GitOps engine installation
  • localpathstorage: Local path storage provisioner
  • metrics-server: Kubernetes metrics server

Common utilities:

  • Installer interface for consistent installation patterns
  • Helm chart deployment helpers
  • Readiness polling for installed components

Index

Constants

View Source
const (
	// DefaultInstallTimeout is the default timeout (5 minutes) for component installation.
	DefaultInstallTimeout = 5 * time.Minute
	// TalosInstallTimeout is the timeout (5 minutes) for Talos component installation.
	// Talos clusters take longer to bootstrap due to the immutable OS design.
	TalosInstallTimeout = 5 * time.Minute
	// CalicoInstallTimeout is the timeout for Calico CNI installs, which often take longer
	// due to multiple components needing to become ready (tigera-operator, calico-node
	// DaemonSet, and calico-kube-controllers Deployment).
	CalicoInstallTimeout = 10 * time.Minute
	// KyvernoInstallTimeout is the timeout for Kyverno policy engine installs, which need
	// extra time for multiple deployments to become ready (admission-controller,
	// background-controller, cleanup-controller, and reports-controller).
	KyvernoInstallTimeout = 7 * time.Minute
	// CertManagerInstallTimeout is the timeout for cert-manager installs, which need
	// extra time for multiple deployments and webhook configurations to become ready.
	CertManagerInstallTimeout = 7 * time.Minute
)

Variables

This section is empty.

Functions

func GetInstallTimeout

func GetInstallTimeout(clusterCfg *v1alpha1.Cluster) time.Duration

GetInstallTimeout determines the timeout for component installation. Uses cluster connection timeout if configured, otherwise defaults to:

  • TalosInstallTimeout (5m) for Talos distribution
  • DefaultInstallTimeout (5m) for all other distributions

Returns DefaultInstallTimeout if clusterCfg is nil.

func MaxTimeout added in v5.20.2

func MaxTimeout(a, b time.Duration) time.Duration

MaxTimeout returns the larger of the two durations.

func WaitForResourceReadiness

func WaitForResourceReadiness(
	ctx context.Context,
	kubeconfig, context string,
	checks []k8s.ReadinessCheck,
	timeout time.Duration,
	componentName string,
) error

WaitForResourceReadiness waits for multiple Kubernetes resources to become ready.

Types

type Installer

type Installer interface {
	// Install installs the component.
	Install(ctx context.Context) error

	// Uninstall uninstalls the component.
	Uninstall(ctx context.Context) error
}

Installer defines methods for installing and uninstalling components.

type MockInstaller

type MockInstaller struct {
	mock.Mock
}

MockInstaller is an autogenerated mock type for the Installer type

func NewMockInstaller

func NewMockInstaller(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockInstaller

NewMockInstaller creates a new instance of MockInstaller. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockInstaller) EXPECT

func (_m *MockInstaller) EXPECT() *MockInstaller_Expecter

func (*MockInstaller) Install

func (_mock *MockInstaller) Install(ctx context.Context) error

Install provides a mock function for the type MockInstaller

func (*MockInstaller) Uninstall

func (_mock *MockInstaller) Uninstall(ctx context.Context) error

Uninstall provides a mock function for the type MockInstaller

type MockInstaller_Expecter

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

func (*MockInstaller_Expecter) Install

func (_e *MockInstaller_Expecter) Install(ctx interface{}) *MockInstaller_Install_Call

Install is a helper method to define mock.On call

  • ctx context.Context

func (*MockInstaller_Expecter) Uninstall

func (_e *MockInstaller_Expecter) Uninstall(ctx interface{}) *MockInstaller_Uninstall_Call

Uninstall is a helper method to define mock.On call

  • ctx context.Context

type MockInstaller_Install_Call

type MockInstaller_Install_Call struct {
	*mock.Call
}

MockInstaller_Install_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Install'

func (*MockInstaller_Install_Call) Return

func (*MockInstaller_Install_Call) Run

func (*MockInstaller_Install_Call) RunAndReturn

type MockInstaller_Uninstall_Call

type MockInstaller_Uninstall_Call struct {
	*mock.Call
}

MockInstaller_Uninstall_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Uninstall'

func (*MockInstaller_Uninstall_Call) Return

func (*MockInstaller_Uninstall_Call) Run

func (*MockInstaller_Uninstall_Call) RunAndReturn

Directories

Path Synopsis
Package argocdinstaller installs Argo CD via Helm.
Package argocdinstaller installs Argo CD via Helm.
Package certmanagerinstaller installs cert-manager via Helm.
Package certmanagerinstaller installs cert-manager via Helm.
cni
Package cni provides unified CNI installer implementations and shared utilities for managing CNI providers on Kubernetes clusters.
Package cni provides unified CNI installer implementations and shared utilities for managing CNI providers on Kubernetes clusters.
calico
Package calicoinstaller provides an installer for installing Calico CNI on a Kubernetes cluster.
Package calicoinstaller provides an installer for installing Calico CNI on a Kubernetes cluster.
cilium
Package ciliuminstaller provides an installer for installing Cilium CNI on a Kubernetes cluster.
Package ciliuminstaller provides an installer for installing Cilium CNI on a Kubernetes cluster.
Package fluxinstaller provides an installer for installing Flux on a Kubernetes cluster.
Package fluxinstaller provides an installer for installing Flux on a Kubernetes cluster.
Package gatekeeperinstaller installs Gatekeeper via Helm.
Package gatekeeperinstaller installs Gatekeeper via Helm.
Package hetznercsiinstaller installs the Hetzner Cloud CSI driver via Helm.
Package hetznercsiinstaller installs the Hetzner Cloud CSI driver via Helm.
Package kubeletcsrapproverinstaller provides an installer for kubelet-csr-approver on a Kubernetes cluster.
Package kubeletcsrapproverinstaller provides an installer for kubelet-csr-approver on a Kubernetes cluster.
Package kyvernoinstaller installs Kyverno via Helm.
Package kyvernoinstaller installs Kyverno via Helm.
Package localpathstorageinstaller provides installation of Rancher Local Path Provisioner for Kind clusters.
Package localpathstorageinstaller provides installation of Rancher Local Path Provisioner for Kind clusters.
Package metricsserverinstaller provides an installer for installing metrics-server on a Kubernetes cluster.
Package metricsserverinstaller provides an installer for installing metrics-server on a Kubernetes cluster.

Jump to

Keyboard shortcuts

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