repository

package
v2.0.0-...-5e8ce1c Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

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) (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

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

type GenerateManifestOpt func(*generateManifestOpt)

func WithCMPTarDoneChannel

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

func WithCMPTarExcludedGlobs(excludedGlobs []string) GenerateManifestOpt

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

type Maintainer

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

type ManifestResponsePromise

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

func NewManifestResponsePromise

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
}

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

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

func (*Service) GetGitDirectories

func (*Service) GetGitFiles

func (*Service) GetHelmCharts

func (*Service) GetRevisionChartDetails

GetRevisionChartDetails returns the helm chart details of a given version

func (*Service) Init

func (s *Service) Init() error

func (*Service) ListApps

ListApps lists the contents of a GitHub repo

func (*Service) ListPlugins

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

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

Jump to

Keyboard shortcuts

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