examples

package
v2.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	reference.Injector
	// contains filtered or unexported fields
}

Generator represents a pipeline for generating example manifests. Generates example manifests for Terraform resources under examples-generated.

func NewGenerator

func NewGenerator(exampleDir, apisModulePath, shortName string, configResources map[string]*config.Resource, opts ...GeneratorOption) *Generator

NewGenerator returns a configured Generator

func (*Generator) Generate

func (eg *Generator) Generate(group, version string, r *config.Resource) error

Generate generates an example manifest for the specified Terraform resource.

func (*Generator) StoreExamples

func (eg *Generator) StoreExamples() error

StoreExamples stores the generated example manifests under examples-generated in their respective API groups.

type GeneratorOption

type GeneratorOption func(*Generator)

func WithCRDScope added in v2.1.0

func WithCRDScope(scope tjtypes.CRDScope) GeneratorOption

WithCRDScope sets the CRD scope for the generator.

func WithLocalSecretRefs

func WithLocalSecretRefs() GeneratorOption

WithLocalSecretRefs configures the example generator to generate examples with local secret references, i.e. no namespace specified.

func WithNamespace added in v2.1.0

func WithNamespace(ns string) GeneratorOption

WithNamespace configures the example generator to generate example manifests with the specified namespace.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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