kustomize

package
v0.1.0-rc.33 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(
	ctx context.Context,
	path string,
	images []string,
	cfg Config,
) ([]byte, error)

Render delegates, in-process to the Argo CD repo server to render plain YAML manifests from a directory containing a kustomization.yaml file. This function also accepts a list of images (address/name + tag) that will be substituted for older versions of the same image. Because of this capability, this function is used for last-mile rendering, even when a configuration management tool other than Kustomize is used for pre-rendering.

Types

type Config

type Config struct {
	// Path is a path to a directory, relative to the root of the repository,
	// where environment-specific Kustomize configuration for this branch can be
	// located. This will be the directory from which `kustomize build` is
	// executed. By convention, if left unspecified, the path is assumed to be
	// identical to the name of the branch.
	Path string `json:"path,omitempty"`
	// EnableHelm specifies whether Kustomize's Helm Chart Inflator should be
	// enabled. If left unspecified, it defaults to false -- not enabled.
	EnableHelm bool `json:"enableHelm,omitempty"`
	// LoadRestrictor specifies whether the Kustomization may load files from
	// outside its root. If set to 'LoadRestrictionsNone', the Kustomization
	// may load files from outside its root. If left unspecified, it defaults
	// to `LoadRestrictionsRootOnly` - which restricts the Kustomization
	// to only loading files from inside its root.
	LoadRestrictor string `json:"loadRestrictor,omitempty"`
}

Config encapsulates optional Kustomize configuration options.

func (Config) Expand

func (c Config) Expand(values []string) Config

Expand expands all file/directory paths referenced by this configuration object, replacing placeholders of the form ${n} where n is a non-negative integer, with corresponding values from the provided string array. The modified object is returned.

Jump to

Keyboard shortcuts

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