Documentation
¶
Index ¶
- Constants
- func WaitForApplicationHealthy(ctx context.Context, kubeClient client.Client, name, targetRevision string, ...) error
- type AppInstaller
- type AppInstallerConfig
- type ArgoCDResources
- type Installer
- type InstallerAPI
- type InstallerConfig
- type LogFunc
- type MockArgoCDResources
- type MockArgoCDResources_ApplyAll_Call
- func (_c *MockArgoCDResources_ApplyAll_Call) Return(err error) *MockArgoCDResources_ApplyAll_Call
- func (_c *MockArgoCDResources_ApplyAll_Call) Run(run func(ctx context.Context)) *MockArgoCDResources_ApplyAll_Call
- func (_c *MockArgoCDResources_ApplyAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockArgoCDResources_ApplyAll_Call
- type MockArgoCDResources_Expecter
Constants ¶
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
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 ¶
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)
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 ¶
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 ¶
func (_m *MockArgoCDResources) EXPECT() *MockArgoCDResources_Expecter
type MockArgoCDResources_ApplyAll_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 (_c *MockArgoCDResources_ApplyAll_Call) Return(err error) *MockArgoCDResources_ApplyAll_Call
func (*MockArgoCDResources_ApplyAll_Call) Run ¶
func (_c *MockArgoCDResources_ApplyAll_Call) Run(run func(ctx context.Context)) *MockArgoCDResources_ApplyAll_Call
func (*MockArgoCDResources_ApplyAll_Call) RunAndReturn ¶
func (_c *MockArgoCDResources_ApplyAll_Call) RunAndReturn(run func(ctx context.Context) error) *MockArgoCDResources_ApplyAll_Call
type MockArgoCDResources_Expecter ¶
type MockArgoCDResources_Expecter struct {
// contains filtered or unexported fields
}
func (*MockArgoCDResources_Expecter) ApplyAll ¶
func (_e *MockArgoCDResources_Expecter) ApplyAll(ctx any) *MockArgoCDResources_ApplyAll_Call
ApplyAll is a helper method to define mock.On call
- ctx context.Context