kustomize

package
v0.3.43 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package manifests contains the KustomizeGenerator implementation of the Generator interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKustomizeGeneratorWithObjectTransformer

func NewKustomizeGeneratorWithObjectTransformer(fsys fs.FS, kustomizationPath string, clnt client.Client, options KustomizeGeneratorOptions, transformer manifests.ObjectTransformer) (manifests.TransformableGenerator, error)

Create a new KustomizeGenerator with an ObjectTransformer attached (further transformers can be attached to the returned generator object).

func NewKustomizeGeneratorWithParameterTransformer

func NewKustomizeGeneratorWithParameterTransformer(fsys fs.FS, kustomizationPath string, clnt client.Client, options KustomizeGeneratorOptions, transformer manifests.ParameterTransformer) (manifests.TransformableGenerator, error)

Create a new KustomizeGenerator with a ParameterTransformer attached (further transformers can be attached to the returned generator object).

func NewTransformableKustomizeGenerator

func NewTransformableKustomizeGenerator(fsys fs.FS, kustomizationPath string, clnt client.Client, options KustomizeGeneratorOptions) (manifests.TransformableGenerator, error)

Create a new KustomizeGenerator as TransformableGenerator.

Types

type KustomizeGenerator

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

KustomizeGenerator is a Generator implementation that basically renders a given Kustomization. Note: KustomizeGenerator's Generate() method expects client and component to be set in the passed context; see: Context.WithClient() and Context.WithComponent() in package pkg/component.

func NewKustomizeGenerator

func NewKustomizeGenerator(fsys fs.FS, kustomizationPath string, clnt client.Client, options KustomizeGeneratorOptions) (*KustomizeGenerator, error)

Create a new KustomizeGenerator. The parameter client should be a client for the local cluster (i.e. the cluster where the component object resides); it is used by the localLookup and mustLocalLookup template functions. If fsys is nil, the local operating system filesystem will be used, and kustomizationPath can be an absolute or relative path (in the latter case it will be considered relative to the current working directory). If fsys is non-nil, then kustomizationPath should be a relative path; if an absolute path is supplied, it will be turned An empty kustomizationPath will be treated like ".".

func (*KustomizeGenerator) Generate

func (g *KustomizeGenerator) Generate(ctx context.Context, namespace string, name string, parameters types.Unstructurable) ([]client.Object, error)

Generate resource descriptors.

type KustomizeGeneratorOptions added in v0.3.32

type KustomizeGeneratorOptions struct {
	// If defined, only files with that suffix will be subject to templating.
	TemplateSuffix *string
	// If defined, the given left delimiter will be used to parse go templates; otherwise, defaults to '{{'
	LeftTemplateDelimiter *string
	// If defined, the given right delimiter will be used to parse go templates; otherwise, defaults to '}}'
	RightTemplateDelimiter *string
}

KustomizeGeneratorOptions allows to tweak the behavior of the kustomize generator.

Jump to

Keyboard shortcuts

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