Version: v0.1.0 Latest Latest

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

Go to latest
Published: Aug 24, 2021 License: BSD-2-Clause Imports: 14 Imported by: 0




This section is empty.


View Source
var (
	TemplateRegex    = regexp.MustCompile(`{{\s*(.*?)\s*}}`)
	TagRegex         = regexp.MustCompile(`:{{\s*(.*?)\s*}}`)
	DigestRegex      = regexp.MustCompile(`@{{\s*(.*?)\s*}}`)
	TagOrDigestRegex = regexp.MustCompile(`[:|@]{{.*?}}`)


func BuildValuesMap

func BuildValuesMap(chart *chart.Chart, rewriteActions []*RewriteAction) map[string]interface{}

func GetChartValues

func GetChartValues(chart *chart.Chart) (int, []byte)


type ImageChange

type ImageChange struct {
	Pattern            *ImageTemplate
	ImageReference     name.Reference
	RewrittenReference name.Reference
	Image              v1.Image
	Digest             string
	AlreadyPushed      bool

func (*ImageChange) ShouldPush

func (change *ImageChange) ShouldPush() bool

type ImageImpl

type ImageImpl struct{}

func (*ImageImpl) Check

func (i *ImageImpl) Check(digest string, imageReference name.Reference) (bool, error)

func (*ImageImpl) Pull

func (i *ImageImpl) Pull(imageReference name.Reference) (v1.Image, string, error)

func (*ImageImpl) Push

func (i *ImageImpl) Push(image v1.Image, dest name.Reference) error

type ImageInterface

type ImageInterface interface {
	Check(digest string, imageReference name.Reference) (bool, error)
	Pull(imageReference name.Reference) (v1.Image, string, error)
	Push(image v1.Image, dest name.Reference) error
var Image ImageInterface = &ImageImpl{}

type ImageTemplate

type ImageTemplate struct {
	Raw      string
	Template *template.Template

	RegistryTemplate              string
	RepositoryTemplate            string
	RegistryAndRepositoryTemplate string
	TagTemplate                   string
	DigestTemplate                string

func NewFromString

func NewFromString(input string) (*ImageTemplate, error)

func ParseImagePatterns

func ParseImagePatterns(patterns []byte) ([]*ImageTemplate, error)

func (*ImageTemplate) Apply

func (t *ImageTemplate) Apply(originalImage name.Reference, rules *OCIImageLocation) ([]*RewriteAction, error)

func (*ImageTemplate) Render

func (t *ImageTemplate) Render(chart *chart.Chart, rewriteActions ...*RewriteAction) (name.Reference, error)

func (*ImageTemplate) String

func (t *ImageTemplate) String() string

type OCIImageLocation

type OCIImageLocation struct {
	Registry         string
	RepositoryPrefix string
	Digest           string

type RewriteAction

type RewriteAction struct {
	Path  string `json:"path"`
	Value string `json:"value"`

func (*RewriteAction) Apply

func (a *RewriteAction) Apply(input *chart.Chart) (*chart.Chart, error)

func (*RewriteAction) FindChartDestination

func (a *RewriteAction) FindChartDestination(parentChart *chart.Chart) *chart.Chart

func (*RewriteAction) GetKey

func (a *RewriteAction) GetKey() string

func (*RewriteAction) GetPathToMap

func (a *RewriteAction) GetPathToMap() string

func (*RewriteAction) GetSubPathToMap

func (a *RewriteAction) GetSubPathToMap() string

func (*RewriteAction) ToMap

func (a *RewriteAction) ToMap() map[string]interface{}

func (*RewriteAction) TopLevelKey

func (a *RewriteAction) TopLevelKey() string

type ValuesMap

type ValuesMap map[string]interface{}


Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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