argocd

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationName

func ApplicationName(release terra.Release) string

ApplicationName name of the primary argo application for a release, eg. cromwell-dev

func EnvironmentSelector added in v0.0.35

func EnvironmentSelector(env terra.Environment) map[string]string

EnvironmentSelector returns set of selectors for all argo apps associated with an environment

func GeneratorName added in v0.0.39

func GeneratorName(destination terra.Destination) string

GeneratorName name of a destinations app generator, eg. "terra-dev-generator"

func LegacyConfigsApplicationName

func LegacyConfigsApplicationName(release terra.Release) string

LegacyConfigsApplicationName name of the firecloud-develop application for a release, eg. cromwell-configs-dev

func Login

func Login(thelmaConfig config.Config, shellRunner shell.Runner, iapToken string) error

Login is a thin wrapper around the `argocd login --sso` command, which: * presents users with a web UI to log in with their GitHub SSO credentials (same flow as logging in to the ArgoCD webapp) * uses those SSO credentials to generate a new ArgoCD authentication token for the user's identity * stores the generated token in ~/.argocd/config

func ProjectName

func ProjectName(destination terra.Destination) string

ProjectName name of the project for the release. eg. terra-dev, cluster-terra-dev

Types

type ArgoCD

type ArgoCD interface {
	// SyncApp will sync an ArgoCD app
	SyncApp(appName string, options ...SyncOption) error
	// HardRefresh will hard refresh an ArgoCD app (force a manifest re-render without a corresponding git change)
	HardRefresh(appName string) error
	// WaitHealthy will wait for an ArgoCD app to become healthy
	WaitHealthy(appName string) error
	// SyncRelease will sync a Terra release's ArgoCD app(s), including the legacy configs app if there is one
	SyncRelease(release terra.Release, options ...SyncOption) error
	// SyncReleases will sync the ArgoCD apps for multiple Terra releases in parallel
	SyncReleases(releases []terra.Release, maxParallel int, options ...SyncOption) error
}

ArgoCD is for running `argocd` commands. Note: we explored using the ArgoCD golang client, but the ArgoCD API is gRPC and designed for async UI communication. As a result it is extremely complicated to do things that are trivial via the CLI.

func New

func New(thelmaConfig config.Config, shellRunner shell.Runner, iapToken string, vaultClient *vaultapi.Client) (ArgoCD, error)

New return a new ArgoCD client

type SyncOption

type SyncOption func(options *SyncOptions)

type SyncOptions

type SyncOptions struct {
	HardRefresh  bool
	SyncIfNoDiff bool
	WaitHealthy  bool
	OnlyLabels   map[string]string
}

Jump to

Keyboard shortcuts

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