kaniko

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalToJson

func MarshalToJson(obj interface{}) ([]byte, error)

func MarshalToYaml

func MarshalToYaml(obj interface{}) ([]byte, error)

Types

type Generator

type Generator interface {
	Create(obj interface{}) error
	Delete(obj interface{}) error
}

type KanikoPodGenerator

type KanikoPodGenerator struct {
	MetaGraf   metagraf.MetaGraf
	Properties metagraf.MGProperties
	Options    KanikoPodOptions
	Resource   corev1.Pod
}

Generator for the Application type

func NewKanikoPodGenerator

func NewKanikoPodGenerator(mg metagraf.MetaGraf, prop metagraf.MGProperties, options KanikoPodOptions) KanikoPodGenerator

Factory for creating a new KanikoPodGenerator

func (*KanikoPodGenerator) Create

func (g *KanikoPodGenerator) Create(obj corev1.Pod) error

func (*KanikoPodGenerator) Delete

func (g *KanikoPodGenerator) Delete(obj corev1.Pod) error

func (*KanikoPodGenerator) Generate added in v0.1.2

func (g *KanikoPodGenerator) Generate(name string) corev1.Pod

func (*KanikoPodGenerator) LogsReader

func (g *KanikoPodGenerator) LogsReader(obj corev1.Pod) (*io.ReadCloser, error)

Return a reference to a io.ReadCloser based on a Pod Log Request or an error.

func (*KanikoPodGenerator) ToJson

func (g *KanikoPodGenerator) ToJson() ([]byte, error)

func (*KanikoPodGenerator) ToYaml

func (g *KanikoPodGenerator) ToYaml() ([]byte, error)

type KanikoPodOption

type KanikoPodOption func(options *KanikoPodOptions)

type KanikoPodOptions

type KanikoPodOptions struct {
	// Namespace for generated Pod
	Namespace string

	// Kaniko container image reference
	Image string

	// --destination Argument for Kaniko executor.
	DestinationArg string

	// --dockerfile Argument for Kaniko executor.
	// Path to Dockerfile in provided --context
	DockerfileArg string

	// --context Argument for Kaniko executor.
	// Se https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts for possible
	// usage scenarios.
	ContextArg string

	// --cache Indicate if we want to use caching at all.
	Cache bool

	// Uses --cache-dir to set local directory as cache for base images. In our context
	// this will be a Volume in the metaGraf specifiation that becomes a PersistantVolume.
	CacheDir string

	// Option for skipping cert verification on image push to a registry.
	SkipTLSVerify bool

	// Option for skipping cert verification on image pulls from a registry.
	SkipTLSVerifyPull bool

	StdIn     bool
	StdInOnce bool
}
var KanikoPodOpts KanikoPodOptions

Instance of ApplicationOptions that can be used for propagating flags and addressable outside of pacage.

func NewOptions

func NewOptions(options ...KanikoPodOption) KanikoPodOptions

Creates a new Options based on defaults from Opts and runs the functional Option methods against it from options.

Jump to

Keyboard shortcuts

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