Documentation ¶
Index ¶
- Constants
- func APIGroupsToVersions(apiGroups []metav1.APIGroup) []string
- func ContainsSyncResource(name string, namespace string, gvk schema.GroupVersionKind, ...) bool
- func FilterByName(apps []argoappv1.Application, name string) ([]argoappv1.Application, error)
- func FilterByProjects(apps []argoappv1.Application, projects []string) []argoappv1.Application
- func FilterByRepo(apps []argoappv1.Application, repo string) []argoappv1.Application
- func FormatAppConditions(conditions []argoappv1.ApplicationCondition) string
- func GetAppProject(spec *argoappv1.ApplicationSpec, projLister applicationsv1.AppProjectLister, ...) (*argoappv1.AppProject, error)
- func GetAppVirtualProject(proj *argoappv1.AppProject, projLister applicationsv1.AppProjectLister, ...) (*argoappv1.AppProject, error)
- func GetGlobalProjects(proj *argoappv1.AppProject, projLister applicationsv1.AppProjectLister, ...) []*argoappv1.AppProject
- func NewDiffNormalizer(ignore []v1alpha1.ResourceIgnoreDifferences, ...) (diff.Normalizer, error)
- func NormalizeApplicationSpec(spec *argoappv1.ApplicationSpec) *argoappv1.ApplicationSpec
- func RefreshApp(appIf v1alpha1.ApplicationInterface, name string, ...) (*argoappv1.Application, error)
- func SetAppOperation(appIf v1alpha1.ApplicationInterface, appName string, op *argoappv1.Operation) (*argoappv1.Application, error)
- func TestRepo(repo *argoappv1.Repository) error
- func TestRepoWithKnownType(repo *argoappv1.Repository, isHelm bool, isHelmOci bool) error
- func ValidateDestination(ctx context.Context, dest *argoappv1.ApplicationDestination, db db.ArgoDB) error
- func ValidatePermissions(ctx context.Context, spec *argoappv1.ApplicationSpec, ...) ([]argoappv1.ApplicationCondition, error)
- func ValidateRepo(ctx context.Context, app *argoappv1.Application, ...) ([]argoappv1.ApplicationCondition, error)
- func WaitForRefresh(ctx context.Context, appIf v1alpha1.ApplicationInterface, name string, ...) (*argoappv1.Application, error)
- type AuditLogger
- type EventInfo
- type ObjectRef
Constants ¶
const ( EventReasonStatusRefreshed = "StatusRefreshed" EventReasonResourceCreated = "ResourceCreated" EventReasonResourceUpdated = "ResourceUpdated" EventReasonResourceDeleted = "ResourceDeleted" EventReasonResourceActionRan = "ResourceActionRan" EventReasonOperationStarted = "OperationStarted" EventReasonOperationCompleted = "OperationCompleted" )
Variables ¶
This section is empty.
Functions ¶
func APIGroupsToVersions ¶
APIGroupsToVersions converts list of API Groups into versions string list
func ContainsSyncResource ¶
func ContainsSyncResource(name string, namespace string, gvk schema.GroupVersionKind, rr []argoappv1.SyncOperationResource) bool
ContainsSyncResource determines if the given resource exists in the provided slice of sync operation resources.
func FilterByName ¶
func FilterByName(apps []argoappv1.Application, name string) ([]argoappv1.Application, error)
FilterByName returns an application
func FilterByProjects ¶
func FilterByProjects(apps []argoappv1.Application, projects []string) []argoappv1.Application
FilterByProjects returns applications which belongs to the specified project
func FilterByRepo ¶
func FilterByRepo(apps []argoappv1.Application, repo string) []argoappv1.Application
FilterByRepo returns an application
func FormatAppConditions ¶
func FormatAppConditions(conditions []argoappv1.ApplicationCondition) string
FormatAppConditions returns string representation of give app condition list
func GetAppProject ¶
func GetAppProject(spec *argoappv1.ApplicationSpec, projLister applicationsv1.AppProjectLister, ns string, settingsManager *settings.SettingsManager) (*argoappv1.AppProject, error)
GetAppProject returns a project from an application
func GetAppVirtualProject ¶
func GetAppVirtualProject(proj *argoappv1.AppProject, projLister applicationsv1.AppProjectLister, settingsManager *settings.SettingsManager) (*argoappv1.AppProject, error)
func GetGlobalProjects ¶
func GetGlobalProjects(proj *argoappv1.AppProject, projLister applicationsv1.AppProjectLister, settingsManager *settings.SettingsManager) []*argoappv1.AppProject
func NewDiffNormalizer ¶
func NewDiffNormalizer(ignore []v1alpha1.ResourceIgnoreDifferences, overrides map[string]v1alpha1.ResourceOverride) (diff.Normalizer, error)
NewDiffNormalizer creates normalizer that uses Argo CD and application settings to normalize the resource prior to diffing.
func NormalizeApplicationSpec ¶
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 ¶
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 ¶
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 ¶
func TestRepo(repo *argoappv1.Repository) error
func TestRepoWithKnownType ¶
func TestRepoWithKnownType(repo *argoappv1.Repository, isHelm bool, isHelmOci bool) error
func ValidateDestination ¶
func ValidateDestination(ctx context.Context, dest *argoappv1.ApplicationDestination, db db.ArgoDB) error
ValidateDestination checks: if we used destination name we infer the server url if we used both name and server then we return an invalid spec error
func ValidatePermissions ¶
func ValidatePermissions(ctx context.Context, spec *argoappv1.ApplicationSpec, proj *argoappv1.AppProject, db db.ArgoDB) ([]argoappv1.ApplicationCondition, error)
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 ¶
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 ¶
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 ¶
type AuditLogger struct {
// contains filtered or unexported fields
}
func NewAuditLogger ¶
func NewAuditLogger(ns string, kIf kubernetes.Interface, component string) *AuditLogger
func (*AuditLogger) LogAppEvent ¶
func (l *AuditLogger) LogAppEvent(app *v1alpha1.Application, info EventInfo, message string)
func (*AuditLogger) LogAppProjEvent ¶
func (l *AuditLogger) LogAppProjEvent(proj *v1alpha1.AppProject, info EventInfo, message string)
func (*AuditLogger) LogResourceEvent ¶
func (l *AuditLogger) LogResourceEvent(res *v1alpha1.ResourceNode, info EventInfo, message string)
Directories ¶
Path | Synopsis |
---|---|
Code generated by github.com/argoproj/argo-cd/hack/known_types.
|
Code generated by github.com/argoproj/argo-cd/hack/known_types. |