helm

package
v0.0.0-...-1b7dea3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeError

func AnalyzeError(err error) string

AnalyzeError returns a human-readable hint based on the error type.

func InstallArgoCD

func InstallArgoCD(ctx context.Context, kubeconfig, kubeContext, env, baseDir string, verbose bool) (bool, error)

InstallArgoCD installs or upgrades ArgoCD using the Helm SDK. It loads values from components/argocd/values/base.yaml and values/<env>.yaml, then runs helm upgrade --install with --wait. Returns helpful error messages for common failure scenarios. Returns a boolean indicating if it was installed (true) or upgraded (false).

Types

type MockHelmAction

type MockHelmAction struct {
	// Simulate errors for testing
	SimulateTimeout       bool
	SimulatePermissionErr bool
	SimulateImagePullErr  bool
	SimulateConflict      bool

	// Track call count for retry logic
	CallCount int
}

MockHelmAction is a mock for testing Helm install/upgrade scenarios.

func NewMockHelmAction

func NewMockHelmAction() *MockHelmAction

NewMockHelmAction creates a new mock Helm action for testing.

func (*MockHelmAction) GetCallCount

func (m *MockHelmAction) GetCallCount() int

GetCallCount returns the number of times the mock was called (useful for retry testing).

func (*MockHelmAction) SimulateInstall

func (m *MockHelmAction) SimulateInstall(ctx context.Context) error

SimulateInstall simulates a Helm install with configurable failure modes.

func (*MockHelmAction) SimulateUpgrade

func (m *MockHelmAction) SimulateUpgrade(ctx context.Context) error

SimulateUpgrade simulates a Helm upgrade with configurable failure modes.

Jump to

Keyboard shortcuts

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