Documentation ¶
Index ¶
- Variables
- func NewCachedImage(img v1.Image, dir string) v1.Image
- type CanonicalDockerImage
- type ContainerRegistryClient
- type ContainerRegistryInterface
- type ImageChange
- type ImageTemplate
- type OCIImageLocation
- type RewriteAction
- func (a *RewriteAction) Apply(chart *chart.Chart) error
- func (a *RewriteAction) FindChartDestination(parentChart *chart.Chart) (*chart.Chart, *RewriteAction)
- func (a *RewriteAction) GetKey() string
- func (a *RewriteAction) GetPathToMap() string
- func (a *RewriteAction) GetSubPathToMap() string
- func (a *RewriteAction) ToMap() map[string]interface{}
- func (a *RewriteAction) TopLevelKey() string
- type ValuesMap
Constants ¶
This section is empty.
Variables ¶
var ( TemplateRegex = regexp.MustCompile(`{{\s*(.*?)\s*}}`) TagRegex = regexp.MustCompile(`:{{\s*(.*?)\s*}}`) DigestRegex = regexp.MustCompile(`@{{\s*(.*?)\s*}}`) TagOrDigestRegex = regexp.MustCompile(`[:|@]{{.*?}}`) )
Functions ¶
func NewCachedImage ¶ added in v0.3.58
NewCachedImage wraps a v1.Image, usually a remote one, so that layer downloads are cached at the given dir. Once the first download happens from an image layer, the next download won't happen and instead the layer is copied from that local directory cache.
Types ¶
type CanonicalDockerImage ¶ added in v0.3.60
CanonicalDockerImage is an image which imageManifest has been modified (indented) to follow the same format used by docker during push [1] and hence preserve the digest once crafted and pushed from a tarball [1] https://github.com/docker/cli/blob/a32cd16160f1b41c1c4ae7bee4dac929d1484e59/cli/command/manifest/push.go#L230 It reimplements v1.Image https://github.com/google/go-containerregistry/blob/main/pkg/v1/image.go#L22
func NewCanonicalDockerImage ¶ added in v0.3.60
func NewCanonicalDockerImage(image v1.Image) *CanonicalDockerImage
NewCanonicalDockerImage returns an instance of the the image which imagemanifest comes indented
func (*CanonicalDockerImage) Digest ¶ added in v0.3.60
func (img *CanonicalDockerImage) Digest() (v1.Hash, error)
func (*CanonicalDockerImage) RawManifest ¶ added in v0.3.60
func (img *CanonicalDockerImage) RawManifest() ([]byte, error)
type ContainerRegistryClient ¶ added in v0.3.45
type ContainerRegistryClient struct {
// contains filtered or unexported fields
}
func NewContainerRegistryClient ¶ added in v0.3.45
func NewContainerRegistryClient(auth authn.Keychain) *ContainerRegistryClient
type ContainerRegistryInterface ¶ added in v0.3.45
type ImageChange ¶
type ImageChange struct { Pattern *ImageTemplate ImageReference name.Reference RewrittenReference name.Reference Image v1.Image Digest string Tag string AlreadyPushed bool }
func (*ImageChange) ShouldPush ¶
func (change *ImageChange) ShouldPush() bool
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.Repository, imageDigest string, 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 RewriteAction ¶
func (*RewriteAction) Apply ¶
func (a *RewriteAction) Apply(chart *chart.Chart) error
Apply will try to execute the rewrite action declaration on the given Helm Chart or sub-charts
func (*RewriteAction) FindChartDestination ¶
func (a *RewriteAction) FindChartDestination(parentChart *chart.Chart) (*chart.Chart, *RewriteAction)
FindChartDestination will recursively find the Helm Chart a rewrite action will apply to by starting on a parentChart Additionally it will return the rewrite action with path relative to that Helm 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