kustomize

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Assets = map[string]*Asset{
	"stock": &kustomizeBase,
}
View Source
var BuildImage = defaultImage

This will get overridden at build time with the appropriate version image.

Functions

func Yamls

func Yamls(setters ...Option) ([]byte, error)

Yamls is a convenience function to run through the kustomize workflow and return the generated yaml bytes from `kustomize build`.

Types

type Asset

type Asset struct {
	// contains filtered or unexported fields
}

Asset is a representation of an embedded file. The file will be gzip encoded via cmd/generator.

func NewAssetFromBytes

func NewAssetFromBytes(b []byte) *Asset

func (*Asset) Bytes

func (a *Asset) Bytes() ([]byte, error)

Bytes provides the byte representation of the embedded asset.

func (*Asset) Reader

func (a *Asset) Reader() (io.Reader, error)

Reader is a convenience function to provide an io.Reader interface for the embedded asset.

func (*Asset) String

func (a *Asset) String() (string, error)

String provides a string representation of the embedded asset.

type Kustomize

type Kustomize struct {
	Base string

	*krusty.Kustomizer
	// contains filtered or unexported fields
}

Kustomize provides the ability to manage Kubernetes resources through kubernetes-sigs/Kustomize.

func NewKustomization

func NewKustomization(setters ...Option) (k *Kustomize, err error)

NewKustomization instantiates a new kustomize workflow. Options are used to control setting specific parameters.

type Option

type Option func(*Kustomize) error

func WithAPI

func WithAPI(o bool) Option

WithAPI configures the controller to use the RedSky API. If true, the controller deployment is patched to pull environment variables from the secret.

func WithFS

func WithFS(fs filesys.FileSystem) Option

func WithImage

func WithImage(i string) Option

WithImage sets the image attribute for the kustomiztion.

func WithImagePullPolicy

func WithImagePullPolicy(pullPolicy string) Option

func WithInstall

func WithInstall() Option

WithInstall initializes a kustomization with the bases of what we need to perform an install/init.

func WithLabels

func WithLabels(l map[string]string) Option

WithLabels sets the common labels attribute for the kustomization.

func WithNamespace

func WithNamespace(n string) Option

WithNamespace sets the namespace attribute for the kustomization.

func WithPatches

func WithPatches(patches []types.Patch) Option

WithPatches updates the kustomization with the specified list of Patches and writes them to the in memory filesystem.

func WithResourceNames

func WithResourceNames(filenames []string) Option

func WithResources

func WithResources(a map[string]*Asset) Option

WithResources updates the kustomization with the specified list of Assets and writes them to the in memory filesystem.

Jump to

Keyboard shortcuts

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