config

package
v1.26.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildContextDir = fmt.Sprintf("%s/buildcontext/", KanikoDir)

BuildContextDir is the directory a build context will be unpacked into, for example, a tarball from a GCS bucket will be unpacked here

View Source
var DockerConfigDir = fmt.Sprintf("%s/.docker/", KanikoDir)

DockerConfigDir is a where registry credentials are stored

View Source
var DockerfilePath = fmt.Sprintf("%s/Dockerfile", KanikoDir)

DockerfilePath is the path the Dockerfile is copied to

View Source
var ErrInvalidGitFlag = errors.New("invalid git flag, must be in the key=value format")
View Source
var KanikoCacheDir = fmt.Sprintf("%s/caches/", KanikoDir)

KanikoCacheDir is where we will store cache mount directories, ie. RUN --mount=type=cache,target=/var/lib/apt/lists/ Contents are stored as-is.

View Source
var KanikoDir = func() string {
	if kd, ok := os.LookupEnv("KANIKO_DIR"); ok {
		return kd
	}
	return constants.DefaultKanikoPath
}()

KanikoDir is the path to the Kaniko directory

View Source
var KanikoInterStageDepsDir = func() string {
	if EnvBoolDefault("FF_KANIKO_NEW_CACHE_LAYOUT", true) {
		return fmt.Sprintf("%s/deps/", KanikoDir)
	}
	return KanikoDir
}()

KanikoInsterStageDir is where we will store inter-stage dependencies Contents are stored as-is.

View Source
var KanikoIntermediateStagesDir = fmt.Sprintf("%s/stages/", KanikoDir)

KanikoIntermediateStagesDir is where we will store intermediate stages as tarballs in case they are needed later on

View Source
var KanikoLayersDir = func() string {
	if EnvBoolDefault("FF_KANIKO_NEW_CACHE_LAYOUT", true) {
		return fmt.Sprintf("%s/layers/", KanikoDir)
	}
	return KanikoDir
}()

KanikoLayersDir is where we will store layers as tarballs

View Source
var KanikoSecretsDir = fmt.Sprintf("%s/secrets/", KanikoDir)

KanikoSecretsDir is a where user defined secrets are stored

View Source
var KanikoSwapDir = fmt.Sprintf("%s/swap/", KanikoDir)

KanikoSwapDir is a temporary directory used to swap out cache and target directories

View Source
var MountInfoPath string
View Source
var RootDir string

Functions

func EnvBool

func EnvBool(key string) bool

func EnvBoolDefault added in v1.26.0

func EnvBoolDefault(key string, def bool) bool

Types

type CacheOptions

type CacheOptions struct {
	CacheDir string
	CacheTTL time.Duration
}

CacheOptions are base image cache options that are set by command line arguments

type Compression

type Compression string

Compression is an enumeration of the supported compression algorithms

const (
	GZip Compression = "gzip"
	ZStd Compression = "zstd"
)

The collection of known MediaType values.

func (*Compression) Set

func (c *Compression) Set(v string) error

func (*Compression) String

func (c *Compression) String() string

func (*Compression) Type

func (c *Compression) Type() string

type KanikoGitOptions

type KanikoGitOptions struct {
	Branch            string
	SingleBranch      bool
	Depth             int
	RecurseSubmodules bool
	InsecureSkipTLS   bool
}

func (*KanikoGitOptions) Set

func (k *KanikoGitOptions) Set(s string) error

func (*KanikoGitOptions) String

func (k *KanikoGitOptions) String() string

func (*KanikoGitOptions) Type

func (k *KanikoGitOptions) Type() string

type KanikoOptions

type KanikoOptions struct {
	RegistryOptions
	CacheOptions
	Destinations                 multiArg
	BuildArgs                    multiArg
	Labels                       multiArg
	Annotations                  keyValueArg
	Git                          KanikoGitOptions
	IgnorePaths                  multiArg
	DockerfilePath               string
	SrcContext                   string
	SnapshotMode                 string
	SnapshotModeDeprecated       string
	CustomPlatform               string
	CustomPlatformDeprecated     string
	Bucket                       string
	TarPath                      string
	TarPathDeprecated            string
	KanikoDir                    string
	Target                       string
	CacheRepo                    string
	DigestFile                   string
	ImageNameDigestFile          string
	ImageNameTagDigestFile       string
	OCILayoutPath                string
	Compression                  Compression
	CompressionLevel             int
	ImageFSExtractRetry          int
	SingleSnapshot               bool
	Reproducible                 bool
	NoPush                       bool
	NoPushCache                  bool
	Cache                        bool
	PreCleanup                   bool
	Cleanup                      bool
	CompressedCaching            bool
	IgnoreVarRun                 bool
	SkipUnusedStages             bool
	RunV2                        bool
	CacheCopyLayers              bool
	CacheRunLayers               bool
	ForceBuildMetadataDeprecated bool
	InitialFSUnpacked            bool
	SkipPushPermissionCheck      bool
	PreserveContext              bool
	Materialize                  bool
	Secrets                      SecretOptions
}

KanikoOptions are options that are set by command line arguments

type KanikoStage

type KanikoStage struct {
	instructions.Stage
	BaseImageIndex         int
	Final                  bool
	BaseImageStoredLocally bool
	SaveStage              bool
	MetaArgs               []instructions.ArgCommand
	Index                  int
}

KanikoStage wraps a stage of the Dockerfile and provides extra information

type RegistryOptions

type RegistryOptions struct {
	RegistryMaps                 multiKeyMultiValueArg
	RegistryMirrors              multiArg
	InsecureRegistries           multiArg
	SkipTLSVerifyRegistries      multiArg
	RegistriesCertificates       keyValueArg
	RegistriesClientCertificates keyValueArg
	SkipDefaultRegistryFallback  bool
	Insecure                     bool
	SkipTLSVerify                bool
	InsecurePull                 bool
	SkipTLSVerifyPull            bool
	PushIgnoreImmutableTagErrors bool
	PushRetry                    int
	ImageDownloadRetry           int
	CredentialHelpers            multiArg
}

RegistryOptions are all the options related to the registries, set by command line arguments.

type SecretOption added in v1.26.3

type SecretOption struct {
	Type string
	Src  string
}

type SecretOptions added in v1.26.3

type SecretOptions map[string]SecretOption

func (*SecretOptions) Set added in v1.26.3

func (s *SecretOptions) Set(val string) error

parsing --secret analogous to buildx reference https://docs.docker.com/reference/cli/docker/buildx/build/#secret

func (*SecretOptions) String added in v1.26.3

func (s *SecretOptions) String() string

func (*SecretOptions) Type added in v1.26.3

func (k *SecretOptions) Type() string

type WarmerOptions

type WarmerOptions struct {
	CacheOptions
	RegistryOptions
	CustomPlatform string
	Images         multiArg
	Force          bool
	DockerfilePath string
	BuildArgs      multiArg
}

WarmerOptions are options that are set by command line arguments to the cache warmer.

Jump to

Keyboard shortcuts

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