app

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

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 ApplicationManifest

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

type ApplicationSelectionInput

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

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
	ValidateLuaHealth              bool
	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
	PluginTimeout                  time.Duration
	Parallelism                    int
	SkipKinds                      []string
	SkipCRDs                       bool
	SkipSecrets                    bool
	PluginRenderer                 render.PluginRenderer
	Applications                   []argoappv1.Application
	ApplicationSetProviderFixtures []string
	ApplicationSetProviderData     appset.ProviderData
	RecordCacheEvents              bool
	StatusCallback                 ApplicationStatusCallback
}

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
}

type DiagRequest

type DiagRequest = BuildRequest

type DiagResult

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

type DiffAppRequest

type DiffAppRequest struct {
	DiffRequest
	Name string
}

type DiffRequest

type DiffRequest struct {
	LeftPath                       string
	RightPath                      string
	Repo                           string
	Ref                            string
	RefOrig                        string
	ChangedOnly                    bool
	StrictChangedOnly              bool
	Strict                         bool
	Unified                        int
	StripAttrs                     []string
	ShowIgnoredFields              bool
	Offline                        bool
	RefreshCharts                  bool
	ChartCacheDir                  string
	ChartCredentials               chart.ChartCredentials
	RepoMaps                       []sourcepkg.RepoMap
	GitCacheDir                    string
	RefreshGit                     bool
	GitCredentials                 sourcepkg.GitCredentials
	RefreshRemoteResources         bool
	RemoteResourceCacheDir         string
	RemoteResourceCredentials      remote.Credentials
	RemoteResourceGitCredentials   remote.GitCredentials
	PluginTimeout                  time.Duration
	Parallelism                    int
	SkipKinds                      []string
	SkipCRDs                       bool
	SkipSecrets                    bool
	ApplicationSetProviderFixtures []string
	ApplicationSetProviderData     appset.ProviderData
	RecordCacheEvents              bool
	// contains filtered or unexported fields
}

type DiffResult

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

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(_ 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 RenderResult

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

func RenderApplication

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

type SourcePlan

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

type StaticRenderers

type StaticRenderers map[string][]render.Manifest

func (StaticRenderers) RenderSource

Jump to

Keyboard shortcuts

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