Documentation ¶
Overview ¶
Package transformer provides transformations for bundles
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageSubRule ¶
ImageSubRule represents string substitutions to preform on images in bundles.
type ImageTransformer ¶
type ImageTransformer struct {
Bundle *bpb.ClusterBundle
}
ImageTransformer makes modifications to container and node images in Bundles.
func (*ImageTransformer) TransformImagesStringSub ¶
func (t *ImageTransformer) TransformImagesStringSub(rules []*ImageSubRule) *bpb.ClusterBundle
TransformImagesStringSub transforms container and node images based on string substitution. A cloned bundle is always returned, even if no changes are made.
Rules are applied in order to images. If two rules apply, then they will be applied in order.
type InlineOptions ¶
type InlineOptions struct { // TopLayerOnly inlines the components and node configuration files and stops // there. TopLayerOnly bool }
InlineOptions are options to give to the inliner.
type Inliner ¶
type Inliner struct { // Local reader reads from the local filesystem. Reader files.FilePBReader }
Inliner inlines bundle files by reading them from the local or a remote filesystem.
func NewInliner ¶
NewInliner creates a new inliner. If the bundle is stored on disk, the cwd should be the absolute path to the directory containing the bundle file on disk.
func (*Inliner) Inline ¶
func (n *Inliner) Inline(ctx context.Context, b *bpb.ClusterBundle, opt *InlineOptions) (*bpb.ClusterBundle, error)
Inline converts dereferences File-references in a bundle and turns them into inline-references. Thus, the returned bundle is a copy with the file-references removed. This doesn't apply to binary images, which are left as-is.