initializer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: Apache-2.0 Imports: 28 Imported by: 1

Documentation

Index

Constants

View Source
const NoBuilder = "None (image not built from these sources)"

NoBuilder allows users to specify they don't want to build an image we parse out from a Kubernetes manifest

Variables

This section is empty.

Functions

func DoInit

func DoInit(ctx context.Context, out io.Writer, c Config) error

DoInit executes the `skaffold init` flow.

func IsSkaffoldConfig

func IsSkaffoldConfig(file string) bool

IsSkaffoldConfig is for determining if a file is skaffold config file.

Types

type Config

type Config struct {
	ComposeFile         string
	CliArtifacts        []string
	SkipBuild           bool
	Force               bool
	Analyze             bool
	EnableJibInit       bool // TODO: Remove this parameter
	EnableBuildpackInit bool
	Opts                config.SkaffoldOptions
}

Config defines the Initializer Config for Init API of skaffold.

type InitBuilder added in v0.33.0

type InitBuilder interface {
	// Name returns the name of the builder
	Name() string
	// Describe returns the initBuilder's string representation, used when prompting the user to choose a builder.
	// Must be unique between artifacts.
	Describe() string
	// CreateArtifact creates an Artifact to be included in the generated Build Config
	CreateArtifact(image string) *latest.Artifact
	// ConfiguredImage returns the target image configured by the builder, or an empty string if no image is configured.
	// This should be a cheap operation.
	ConfiguredImage() string
	// Path returns the path to the build file
	Path() string
}

InitBuilder represents a builder that can be chosen by skaffold init.

type Initializer

type Initializer interface {
	// GenerateDeployConfig generates Deploy Config for skaffold configuration.
	GenerateDeployConfig() latest.DeployConfig
	// GetImages fetches all the images defined in the manifest files.
	GetImages() []string
}

Initializer is the Init API of skaffold and responsible for generating skaffold configuration file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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