app

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Overview

Package app coordinates Application discovery, planning, rendering, and desired-state diff operations.

Index

Constants

View Source
const (
	DiscoveryModeFleet  = "fleet"
	DiscoveryModeStatic = "static"

	DefaultMaxDiscoveryDepth = 4
)
View Source
const (
	ApplicationStatusPass    = "PASS"
	ApplicationStatusFail    = "FAIL"
	ApplicationStatusSkipped = "SKIPPED"
)

Variables

This section is empty.

Functions

func ApplyDestinationNamespace

func ApplyDestinationNamespace(application argoappv1.Application, obj *unstructured.Unstructured)

func IsBuiltInClusterScoped

func IsBuiltInClusterScoped(gvk schema.GroupVersionKind) bool

func SelectApplicationByName

func SelectApplicationByName(apps []argoappv1.Application, target string) (argoappv1.Application, error)

func SelectChangedApplicationInputs

func SelectChangedApplicationInputs(inputs []ApplicationSelectionInput, changedPaths []string) ([]argoappv1.Application, []string)

SelectChangedApplicationInputs returns Applications whose explicit inputs or declared local source paths intersect at least one changed path.

func SelectChangedApplications

func SelectChangedApplications(apps []argoappv1.Application, changedPaths []string) ([]argoappv1.Application, []string)

SelectChangedApplications returns Applications whose declared local source paths intersect at least one changed path, plus normalized unowned changes.

func SelectOptionalApplicationByName

func SelectOptionalApplicationByName(apps []argoappv1.Application, target string) (argoappv1.Application, bool, error)

Types

type AcquisitionOptions added in v0.1.5

type AcquisitionOptions struct {
	Offline                      bool
	RefreshCharts                bool
	ChartCacheDir                string
	ChartCredentials             chart.ChartCredentials
	RepoMaps                     []sourcepkg.RepoMap
	GitCacheDir                  string
	RefreshGit                   bool
	GitCredentials               sourcepkg.GitCredentials
	RefreshRemoteResources       bool
	RemoteResourceCacheDir       string
	RemoteResourceForbiddenRoots []string
	RemoteResourceCredentials    remote.Credentials
	RemoteResourceGitCredentials remote.GitCredentials
	RecordCacheEvents            bool
}

type ApplicationManifest

type ApplicationManifest struct {
	Application argoappv1.Application
	Manifest    render.Manifest
}

type ApplicationRenderOptions added in v0.1.7

type ApplicationRenderOptions struct {
	PluginOptions   PluginOptions
	TrackingOptions TrackingOptions
}

type ApplicationSelectionInput

type ApplicationSelectionInput struct {
	Application argoappv1.Application
	Paths       []string
}

type ApplicationSetOptions added in v0.1.5

type ApplicationSetOptions struct {
	ApplicationSetProviderFixtures []string
	ApplicationSetProviderData     appset.ProviderData
}

type ApplicationStatus

type ApplicationStatus struct {
	Namespace string `json:"namespace" yaml:"namespace"`
	Name      string `json:"name" yaml:"name"`
	Status    string `json:"status" yaml:"status"`
	Message   string `json:"message,omitempty" yaml:"message,omitempty"`
}

type ApplicationStatusCallback

type ApplicationStatusCallback func(ApplicationStatusEvent) error

type ApplicationStatusEvent

type ApplicationStatusEvent struct {
	Status    ApplicationStatus
	Completed int
	Total     int
}

type BuildAppRequest

type BuildAppRequest struct {
	BuildRequest
	Name string
}

type BuildRequest

type BuildRequest struct {
	Path   string
	Strict bool
	// StatusOnly renders Applications for validation without retaining manifests.
	StatusOnly bool
	DiscoveryOptions
	ValidateLuaHealth bool
	AcquisitionOptions
	PluginOptions
	ExecutionOptions
	FilterOptions
	PluginRenderer render.PluginRenderer
	Applications   []argoappv1.Application
	ApplicationSetOptions
	StatusCallback ApplicationStatusCallback
	// contains filtered or unexported fields
}

type BuildResult

type BuildResult struct {
	Applications         []argoappv1.Application
	ApplicationInputs    []ApplicationSelectionInput
	Projects             []argoappv1.AppProject
	Manifests            []render.Manifest
	ApplicationManifests []ApplicationManifest
	Diagnostics          []diagnostic.Diagnostic
	Settings             config.ArgoSettings
	Statuses             []ApplicationStatus
	CacheEvents          []cacheevent.Event
	PluginExecutions     []PluginExecution
	// contains filtered or unexported fields
}

type DiagRequest

type DiagRequest = BuildRequest

type DiagResult

type DiagResult struct {
	Applications     []argoappv1.Application
	Diagnostics      []diagnostic.Diagnostic
	Settings         config.ArgoSettings
	CacheEvents      []cacheevent.Event
	PluginExecutions []PluginExecution
}

type DiffAppRequest

type DiffAppRequest struct {
	DiffRequest
	Name string
}

type DiffRequest

type DiffRequest struct {
	LeftPath  string
	RightPath string
	Repo      string
	Ref       string
	RefOrig   string
	DiscoveryOptions
	ChangedOnly       bool
	StrictChangedOnly bool
	Strict            bool
	Unified           int
	StripAttrs        []string
	ShowIgnoredFields bool
	AcquisitionOptions
	PluginOptions
	ExecutionOptions
	FilterOptions
	ApplicationSetOptions
	// contains filtered or unexported fields
}

type DiffResult

type DiffResult struct {
	Results     []diff.Result
	Diagnostics []diagnostic.Diagnostic
	CacheEvents []cacheevent.Event
}

type DiscoveryOptions added in v0.1.5

type DiscoveryOptions struct {
	DiscoveryMode          string
	MaxDiscoveryDepth      int
	MaxDiscoveryDepthSet   bool
	DiscoverKustomizePaths []string
}

type ExecutionOptions added in v0.1.5

type ExecutionOptions struct {
	Parallelism int
}

type FilterOptions added in v0.1.5

type FilterOptions struct {
	SkipKinds   []string
	SkipCRDs    bool
	SkipSecrets bool
}

type ImageDiffResult

type ImageDiffResult struct {
	Added       []string
	Removed     []string
	Unchanged   []string
	Diagnostics []diagnostic.Diagnostic
	CacheEvents []cacheevent.Event
}

type Orchestrator

type Orchestrator struct {
	ChartAcquirer          chart.Acquirer
	GitAcquirer            sourcepkg.GitAcquirer
	RemoteResourceAcquirer remote.Acquirer
	PluginRenderer         render.PluginRenderer
}

func (Orchestrator) Build

func (o Orchestrator) Build(ctx context.Context, request BuildRequest) (BuildResult, error)

func (Orchestrator) BuildApp

func (o Orchestrator) BuildApp(ctx context.Context, request BuildAppRequest) (BuildResult, error)

func (Orchestrator) Diag

func (o Orchestrator) Diag(ctx context.Context, request DiagRequest) (DiagResult, error)

func (Orchestrator) DiffApp

func (o Orchestrator) DiffApp(ctx context.Context, request DiffAppRequest) (DiffResult, error)

func (Orchestrator) DiffApps

func (o Orchestrator) DiffApps(ctx context.Context, request DiffRequest) (DiffResult, error)

func (Orchestrator) DiffImages

func (o Orchestrator) DiffImages(ctx context.Context, request DiffRequest) (ImageDiffResult, error)

func (Orchestrator) ListApplications

func (o Orchestrator) ListApplications(ctx context.Context, request BuildRequest) (BuildResult, error)

type PlanResult

type PlanResult struct {
	Application argoappv1.Application
	Sources     []SourcePlan
	Refs        map[string]SourcePlan
}

func Plan

func Plan(application argoappv1.Application) (PlanResult, error)

type PluginExecution added in v0.1.6

type PluginExecution struct {
	AppNamespace string `json:"appNamespace" yaml:"appNamespace"`
	AppName      string `json:"appName" yaml:"appName"`
	SourceIndex  int    `json:"sourceIndex" yaml:"sourceIndex"`
	SourceName   string `json:"sourceName,omitempty" yaml:"sourceName,omitempty"`
	SourcePath   string `json:"sourcePath,omitempty" yaml:"sourcePath,omitempty"`
	PluginName   string `json:"pluginName" yaml:"pluginName"`
	Engine       string `json:"engine" yaml:"engine"`
	Phase        string `json:"phase" yaml:"phase"`
	Command      string `json:"command" yaml:"command"`
	Duration     string `json:"duration" yaml:"duration"`
}

type PluginOptions added in v0.1.5

type PluginOptions struct {
	PluginTimeout            time.Duration
	EnableAVPCompat          bool
	EnablePlugins            bool
	PluginPolicyPath         string
	PluginPolicyPathExplicit bool
	PluginPolicyRef          string
	PluginPolicyRepo         string
	DisablePluginPolicy      bool
	// contains filtered or unexported fields
}

type RenderResult

type RenderResult struct {
	Manifests        []render.Manifest
	Diagnostics      []diagnostic.Diagnostic
	PluginExecutions []PluginExecution
}

func RenderApplication

func RenderApplication(ctx context.Context, application argoappv1.Application, provider render.Provider, pluginOptions ...PluginOptions) (RenderResult, error)

func RenderApplicationWithOptions added in v0.1.7

func RenderApplicationWithOptions(ctx context.Context, application argoappv1.Application, provider render.Provider, options ApplicationRenderOptions) (RenderResult, error)

type SourcePlan

type SourcePlan struct {
	Index        int
	Name         string
	RefKey       string
	Source       argoappv1.ApplicationSource
	SourceRoot   string
	RefOnly      bool
	ExplicitType argoappv1.ApplicationSourceType
}

type StaticRenderers

type StaticRenderers map[string][]render.Manifest

func (StaticRenderers) RenderSource

type TrackingOptions added in v0.1.7

type TrackingOptions struct {
	Method              string
	InstanceLabelKey    string
	InstallationID      string
	ControllerNamespace string
}

Jump to

Keyboard shortcuts

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