argo

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 30 Imported by: 66

Documentation

Index

Constants

View Source
const (
	EventReasonStatusRefreshed    = "StatusRefreshed"
	EventReasonResourceCreated    = "ResourceCreated"
	EventReasonResourceUpdated    = "ResourceUpdated"
	EventReasonResourceDeleted    = "ResourceDeleted"
	EventReasonOperationStarted   = "OperationStarted"
	EventReasonOperationCompleted = "OperationCompleted"
)

Variables

This section is empty.

Functions

func ContainsSyncResource added in v0.10.0

func ContainsSyncResource(name string, gvk schema.GroupVersionKind, rr []argoappv1.SyncOperationResource) bool

ContainsSyncResource determines if the given resource exists in the provided slice of sync operation resources.

func FilterByProjects added in v0.6.0

func FilterByProjects(apps []argoappv1.Application, projects []string) []argoappv1.Application

FilterByProjects returns applications which belongs to the specified project

func FormatAppConditions added in v0.6.0

func FormatAppConditions(conditions []argoappv1.ApplicationCondition) string

FormatAppConditions returns string representation of give app condition list

func GetAppProject added in v0.6.0

GetAppProject returns a project from an application

func NewDiffNormalizer added in v0.12.0

func NewDiffNormalizer(ignore []v1alpha1.ResourceIgnoreDifferences, overrides map[string]v1alpha1.ResourceOverride) (diff.Normalizer, error)

NewDiffNormalizer creates diff normalizer which removes ignored fields according to given application spec and resource overrides

func NormalizeApplicationSpec added in v0.11.0

func NormalizeApplicationSpec(spec *argoappv1.ApplicationSpec) *argoappv1.ApplicationSpec

NormalizeApplicationSpec will normalize an application spec to a preferred state. This is used for migrating application objects which are using deprecated legacy fields into the new fields, and defaulting fields in the spec (e.g. spec.project)

func RefreshApp added in v0.4.0

func RefreshApp(appIf v1alpha1.ApplicationInterface, name string, refreshType argoappv1.RefreshType) (*argoappv1.Application, error)

RefreshApp updates the refresh annotation of an application to coerce the controller to process it

func SetAppOperation added in v0.9.0

func SetAppOperation(appIf v1alpha1.ApplicationInterface, appName string, op *argoappv1.Operation) (*argoappv1.Application, error)

SetAppOperation updates an application with the specified operation, retrying conflict errors

func TestRepo added in v1.2.4

func TestRepo(repo *argoappv1.Repository) error

func TestRepoWithKnownType added in v1.2.4

func TestRepoWithKnownType(repo *argoappv1.Repository, isHelm bool) error

func ValidatePermissions added in v0.12.3

ValidatePermissions ensures that the referenced cluster has been added to Argo CD and the app source repo and destination namespace/cluster are permitted in app project

func ValidateRepo added in v0.12.3

func ValidateRepo(
	ctx context.Context,
	app *argoappv1.Application,
	repoClientset apiclient.Clientset,
	db db.ArgoDB,
	kustomizeOptions *argoappv1.KustomizeOptions,
	plugins []*argoappv1.ConfigManagementPlugin,
	kubectl kube.Kubectl,
) ([]argoappv1.ApplicationCondition, error)

ValidateRepo validates the repository specified in application spec. Following is checked: * the repository is accessible * the path contains valid manifests * there are parameters of only one app source type * ksonnet: the specified environment exists

func WaitForRefresh added in v0.5.3

func WaitForRefresh(ctx context.Context, appIf v1alpha1.ApplicationInterface, name string, timeout *time.Duration) (*argoappv1.Application, error)

WaitForRefresh watches an application until its comparison timestamp is after the refresh timestamp If refresh timestamp is not present, will use current timestamp at time of call

Types

type AuditLogger added in v0.7.0

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

func NewAuditLogger added in v0.7.0

func NewAuditLogger(ns string, kIf kubernetes.Interface, component string) *AuditLogger

func (*AuditLogger) LogAppEvent added in v0.7.0

func (l *AuditLogger) LogAppEvent(app *v1alpha1.Application, info EventInfo, message string)

func (*AuditLogger) LogAppProjEvent added in v0.7.0

func (l *AuditLogger) LogAppProjEvent(proj *v1alpha1.AppProject, info EventInfo, message string)

type EventInfo added in v0.7.0

type EventInfo struct {
	Type   string
	Reason string
}

Jump to

Keyboard shortcuts

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