Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzeError ¶
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.