repository

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 58 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExceededMaxCombinedManifestFileSize = errors.New("exceeded max combined manifest file size")
)

Functions

func GenerateManifests

func GenerateManifests(ctx context.Context, appPath, repoRoot, revision string, q *apiclient.ManifestRequest, isLocal bool, gitCredsStore git.CredsStore, maxCombinedManifestQuantity resource.Quantity, gitRepoPaths io.TempPaths, opts ...GenerateManifestOpt) (*apiclient.ManifestResponse, error)

GenerateManifests generates manifests from a path. Overrides are applied as a side effect on the given ApplicationSource.

func GetAppSourceType

func GetAppSourceType(ctx context.Context, source *v1alpha1.ApplicationSource, appPath, repoPath, appName string, enableGenerateManifests map[string]bool, tarExcludedGlobs []string, env []string) (v1alpha1.ApplicationSourceType, error)

GetAppSourceType returns explicit application source type or examines a directory and determines its application source type

func NewRepositoryLock

func NewRepositoryLock() *repositoryLock

Types

type Chart added in v2.9.0

type Chart struct {
	Description string       `yaml:"description,omitempty"`
	Home        string       `yaml:"home,omitempty"`
	Maintainers []Maintainer `yaml:"maintainers,omitempty"`
}

Chart see: https://helm.sh/docs/topics/charts/ for more details

type GenerateManifestOpt added in v2.4.0

type GenerateManifestOpt func(*generateManifestOpt)

func WithCMPTarDoneChannel added in v2.4.0

func WithCMPTarDoneChannel(ch chan<- bool) GenerateManifestOpt

WithCMPTarDoneChannel defines the channel to be used to signalize when the tarball generation is concluded when generating manifests with the CMP server. This is used to unlock the git repo as soon as possible.

func WithCMPTarExcludedGlobs added in v2.4.4

func WithCMPTarExcludedGlobs(excludedGlobs []string) GenerateManifestOpt

WithCMPTarExcludedGlobs defines globs for files to filter out when streaming the tarball to a CMP sidecar.

type Maintainer added in v2.9.0

type Maintainer struct {
	Name  string `yaml:"name,omitempty"`
	Email string `yaml:"email,omitempty"`
	Url   string `yaml:"url,omitempty"`
}

type ManifestResponsePromise added in v2.4.0

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

func NewManifestResponsePromise added in v2.4.0

func NewManifestResponsePromise(responseCh <-chan *apiclient.ManifestResponse, tarDoneCh <-chan bool, errCh chan error) *ManifestResponsePromise

type RepoServerInitConstants

type RepoServerInitConstants struct {
	ParallelismLimit                             int64
	PauseGenerationAfterFailedGenerationAttempts int
	PauseGenerationOnFailureForMinutes           int
	PauseGenerationOnFailureForRequests          int
	SubmoduleEnabled                             bool
	MaxCombinedDirectoryManifestsSize            resource.Quantity
	CMPTarExcludedGlobs                          []string
	AllowOutOfBoundsSymlinks                     bool
	StreamedManifestMaxExtractedSize             int64
	StreamedManifestMaxTarSize                   int64
	HelmManifestMaxExtractedSize                 int64
	HelmRegistryMaxIndexSize                     int64
	DisableHelmManifestMaxExtractedSize          bool
	IncludeHiddenDirectories                     bool
}

type Service

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

Service implements ManifestService interface

func NewService

func NewService(metricsServer *metrics.MetricsServer, cache *cache.Cache, initConstants RepoServerInitConstants, resourceTracking argo.ResourceTracking, gitCredsStore git.CredsStore, rootDir string) *Service

NewService returns a new instance of the Manifest service

func (*Service) GenerateManifest

func (*Service) GenerateManifestWithFiles added in v2.5.0

func (s *Service) GenerateManifestWithFiles(stream apiclient.RepoServerService_GenerateManifestWithFilesServer) error

func (*Service) GetGitDirectories added in v2.8.0

func (*Service) GetGitFiles added in v2.8.0

func (*Service) GetHelmCharts

func (*Service) GetRevisionChartDetails added in v2.8.0

GetRevisionChartDetails returns the helm chart details of a given version

func (*Service) Init added in v2.3.0

func (s *Service) Init() error

func (*Service) ListApps

ListApps lists the contents of a GitHub repo

func (*Service) ListPlugins added in v2.6.0

func (s *Service) ListPlugins(ctx context.Context, _ *empty.Empty) (*apiclient.PluginList, error)

ListPlugins lists the contents of a GitHub repo

func (*Service) ListRefs

ListRefs List a subset of the refs (currently, branches and tags) of a git repo

func (*Service) ResolveRevision added in v2.3.0

ResolveRevision resolves the revision/ambiguousRevision specified in the ResolveRevisionRequest request into a concrete revision.

func (*Service) TestRepository added in v2.1.0

func (*Service) UpdateRevisionForPaths added in v2.11.0

UpdateRevisionForPaths compares two git revisions and checks if the files in the given paths have changed If no files were changed, it will store the already cached manifest to the key corresponding to the old revision, avoiding an unnecessary generation. Example: cache has key "a1a1a1" with manifest "x", and the files for that manifest have not changed, "x" will be stored again with the new revision "b2b2b2".

Jump to

Keyboard shortcuts

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