argocd

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: May 5, 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 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
	// 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 paralle
	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) (ArgoCD, error)

New return a new ArgoCD client

type SyncOption

type SyncOption func(options *SyncOptions)

type SyncOptions

type SyncOptions struct {
	HardRefresh  bool
	SyncIfNoDiff bool
}

Jump to

Keyboard shortcuts

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