helm

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyToUpdate

func ApplyToUpdate(r IndexLoader, update *Update)

func NewS3Getter

func NewS3Getter(_ []getter.Option) (getter.Getter, error)

func PathToLoad

func PathToLoad(pathRegex []*regexp.Regexp, path string) bool

func S3Provider

func S3Provider() getter.Provider

func WriteChangesToFilesystem

func WriteChangesToFilesystem(files []*ParsedFile) error

Types

type AutoUpdateChart

type AutoUpdateChart struct {
	Repository string `json:"repository"`
	Name       string `json:"name"`
	Version    string `json:"version"`
}

type AutoUpdateCharts

type AutoUpdateCharts struct {
	Identity string          `json:"identity"`
	Chart    AutoUpdateChart `json:"chart"`
}

type Autochange

type Autochange struct {
	Charts        []AutoUpdateCharts `json:"charts"`
	FilenameRegex []string           `json:"filename_regex,omitempty"`
	ParsedRegex   []*regexp.Regexp   `json:"-"`
}

Autochange is a Helm plugin that automatically changes the chart version. Example: charts:

  • identity: datadog chart: repository: s3://cresta-helm-charts-v2/monorepo/cresta-datadog name: cresta-datadog version: "*"

func Load

func Load(data []byte) (*Autochange, error)

func LoadFile

func LoadFile(path string) (*Autochange, error)

type CachedLoader

type CachedLoader struct {
	IndexLoader IndexLoader
	// contains filtered or unexported fields
}

func (*CachedLoader) LoadIndexFile

func (r *CachedLoader) LoadIndexFile(indexURL string) (*repo.IndexFile, error)

type ChangeFinder

type ChangeFinder interface {
	FindRequestedChanges() ([]*ParsedFile, error)
}

type DefaultProviders

type DefaultProviders struct {
	Providers getter.Providers
	// contains filtered or unexported fields
}

type DirectLoader

type DirectLoader struct {
	DefaultProviders
}

func (*DirectLoader) LoadIndexFile

func (r *DirectLoader) LoadIndexFile(baseURL string) (*repo.IndexFile, error)

type DirectorySearchForChanges

type DirectorySearchForChanges struct {
	Dir string
}

func (*DirectorySearchForChanges) FindRequestedChanges

func (r *DirectorySearchForChanges) FindRequestedChanges(regexPathFilters []*regexp.Regexp) ([]*ParsedFile, error)

type IndexLoader

type IndexLoader interface {
	LoadIndexFile(URL string) (*repo.IndexFile, error)
}

type LineParse

type LineParse struct {
	Prefix         string
	CurrentVersion string
	Identity       string
	Suffix         string
}

func ParseLine

func ParseLine(line string) *LineParse

func (*LineParse) String

func (l *LineParse) String() string

type ParsedFile

type ParsedFile struct {
	OriginalFilename    string
	OriginalContent     string
	OriginalPermissions fs.FileMode
	Lines               []string
	RequestedUpdates    []Update
}

func ApplyUpdatesToFiles

func ApplyUpdatesToFiles(il IndexLoader, config *Autochange, files []*ParsedFile) ([]*ParsedFile, error)

func ParseContent

func ParseContent(s string) ParsedFile

func ParseFile

func ParseFile(name string) (*ParsedFile, error)

func (*ParsedFile) ApplyUpdate

func (p *ParsedFile) ApplyUpdate(update *Update)

func (*ParsedFile) Bytes

func (p *ParsedFile) Bytes() []byte

type Update

type Update struct {
	LineNumber int
	Parse      *LineParse
}

func CheckForUpdate

func CheckForUpdate(il IndexLoader, desc *AutoUpdateChart, request *Update) (*Update, error)

Jump to

Keyboard shortcuts

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