assets

package
v0.0.0-...-7a4df5e Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RewriteManifests = featureflag.New("RewriteManifests", featureflag.Bool(true))

RewriteManifests controls whether we rewrite manifests Because manifest rewriting converts everything to and from YAML, we normalize everything by doing so

Functions

This section is empty.

Types

type AssetBuilder

type AssetBuilder struct {
	ContainerAssets []*ContainerAsset
	FileAssets      []*FileAsset
	AssetsLocation  *kops.Assets
}

AssetBuilder discovers and remaps assets

func NewAssetBuilder

func NewAssetBuilder(assets *kops.Assets) *AssetBuilder

func (AssetBuilder) RemapFile

func (a AssetBuilder) RemapFile(file string) (string, error)

RemapFile sets a new url location for the file, if a AssetsLocation is defined.

func (*AssetBuilder) RemapImage

func (a *AssetBuilder) RemapImage(image string) (string, error)

func (*AssetBuilder) RemapManifest

func (a *AssetBuilder) RemapManifest(data []byte) ([]byte, error)

RemapManifest transforms a kubernetes manifest. Whenever we are building a Task that includes a manifest, we should pass it through RemapManifest first. This will: * rewrite the images if they are being redirected to a mirror, and ensure the image is uploaded

type ContainerAsset

type ContainerAsset struct {
	// DockerImage will be the name of the docker image we should run, if this is a docker image
	DockerImage string

	// CanonicalLocation will be the source location of the image, if we should copy it to the actual location
	CanonicalLocation string
}

type FileAsset

type FileAsset struct {
	// File will be the name of the file we should use
	File string

	// CanonicalLocation will be the source location of the file, if we should copy it to the actual location
	CanonicalLocation string
}

Jump to

Keyboard shortcuts

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