argocd

package
v1.372.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRepoURL   = "https://argoproj.github.io/argo-helm"
	DefaultNamespace = "argocd"
)

Variables

This section is empty.

Functions

func WaitForApplicationHealthy added in v1.370.0

func WaitForApplicationHealthy(ctx context.Context, kubeClient client.Client, name, targetRevision string, logf LogFunc) error

WaitForApplicationHealthy waits until Argo CD has compared the requested target revision and reports the Application as healthy and synced.

Types

type AppInstaller added in v1.264.0

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

AppInstaller installs ArgoCD, syncs the vault secret, and registers the pc-applications app-of-apps from the installer BOM.

func NewAppInstaller added in v1.264.0

func NewAppInstaller(cfg AppInstallerConfig) *AppInstaller

NewAppInstaller creates an ArgoCD-and-applications installer.

func (*AppInstaller) InstallArgoCD added in v1.264.0

func (i *AppInstaller) InstallArgoCD() error

InstallArgoCD installs or upgrades ArgoCD using the configured installer.

func (*AppInstaller) InstallPCApps added in v1.264.0

func (i *AppInstaller) InstallPCApps(ctx context.Context, bomConfig *bom.Config) error

InstallPCApps creates or updates the pc-applications app-of-apps ArgoCD Application using the chart version from the supplied installer BOM.

func (*AppInstaller) SyncVaultSecret added in v1.264.0

func (i *AppInstaller) SyncVaultSecret(ctx context.Context) error

SyncVaultSecret refreshes the service account tokens and creates or updates the Codesphere vault secret in Kubernetes.

type AppInstallerConfig added in v1.264.0

type AppInstallerConfig struct {
	Config       files.RootConfig
	Vault        *files.InstallVault
	RESTConfig   *rest.Config
	KubeClient   client.Client
	Installer    InstallerAPI
	PCAppsValues []string
}

AppInstallerConfig configures the shared ArgoCD, vault secret, and pc-applications app-of-apps workflow.

type ArgoCDResources

type ArgoCDResources interface {
	ApplyAll(ctx context.Context) error
}

func NewArgoCDResources

func NewArgoCDResources(clientset kubernetes.Interface, dataCenterId string, ociPassword string, ociRegistryURL string, gitPassword string) (ArgoCDResources, error)

type Installer

type Installer struct {
	InstallerConfig
	Helm      installer.HelmClient
	Resources ArgoCDResources
}

Installer holds the resolved configuration and initialized clients.

func NewInstaller

func NewInstaller(cfg InstallerConfig) (*Installer, error)

func (*Installer) Install

func (a *Installer) Install() error

Install is the top-level orchestrator. It delegates every Helm interaction to the HelmClient interface, keeping this function short and testable.

type InstallerAPI added in v1.264.0

type InstallerAPI interface {
	Install() error
}

InstallerAPI is implemented by the concrete ArgoCD chart installer.

type InstallerConfig

type InstallerConfig struct {
	Version        string
	DatacenterId   string
	OciPassword    string
	OciRegistryURL string
	GitPassword    string
	FullInstall    bool
	ForceConflicts bool
	RepoURL        string
	ValueFiles     []string
	RESTConfig     *rest.Config
}

InstallerConfig holds all user-facing parameters for an ArgoCD install/upgrade.

type LogFunc added in v1.370.0

type LogFunc func(format string, args ...interface{})

LogFunc records formatted application readiness messages.

type MockArgoCDResources

type MockArgoCDResources struct {
	mock.Mock
}

MockArgoCDResources is an autogenerated mock type for the ArgoCDResources type

func NewMockArgoCDResources

func NewMockArgoCDResources(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockArgoCDResources

NewMockArgoCDResources creates a new instance of MockArgoCDResources. 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 (*MockArgoCDResources) ApplyAll

func (_mock *MockArgoCDResources) ApplyAll(ctx context.Context) error

ApplyAll provides a mock function for the type MockArgoCDResources

func (*MockArgoCDResources) EXPECT

type MockArgoCDResources_ApplyAll_Call

type MockArgoCDResources_ApplyAll_Call struct {
	*mock.Call
}

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

func (*MockArgoCDResources_ApplyAll_Call) Return

func (*MockArgoCDResources_ApplyAll_Call) Run

func (*MockArgoCDResources_ApplyAll_Call) RunAndReturn

type MockArgoCDResources_Expecter

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

func (*MockArgoCDResources_Expecter) ApplyAll

ApplyAll is a helper method to define mock.On call

  • ctx context.Context

Jump to

Keyboard shortcuts

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