Documentation
¶
Overview ¶
Package scaffolder provides utilities for scaffolding KSail project files and configuration.
Index ¶
Constants ¶
View Source
const ( KindConfigFile = "kind.yaml" K3dConfigFile = "k3d.yaml" )
Distribution config file constants.
Variables ¶
View Source
var ( ErrUnknownDistribution = errors.New("provided distribution is unknown") ErrKSailConfigGeneration = errors.New("failed to generate KSail configuration") ErrKindConfigGeneration = errors.New("failed to generate Kind configuration") ErrK3dConfigGeneration = errors.New("failed to generate K3d configuration") ErrKustomizationGeneration = errors.New("failed to generate kustomization configuration") )
Error definitions for distribution handling.
Functions ¶
This section is empty.
Types ¶
type GenerationParams ¶
type GenerationParams[T any] struct { Gen generator.Generator[T, yamlgenerator.Options] Model T Opts yamlgenerator.Options DisplayName string Force bool WrapErr func(error) error }
GenerationParams groups parameters for generateWithFileHandling.
type Scaffolder ¶
type Scaffolder struct {
KSailConfig v1alpha1.Cluster
KSailYAMLGenerator generator.Generator[v1alpha1.Cluster, yamlgenerator.Options]
KindGenerator generator.Generator[*v1alpha4.Cluster, yamlgenerator.Options]
K3dGenerator generator.Generator[*k3dv1alpha5.SimpleConfig, yamlgenerator.Options]
KustomizationGenerator generator.Generator[*ktypes.Kustomization, yamlgenerator.Options]
Writer io.Writer
}
Scaffolder is responsible for generating KSail project files and configurations.
func NewScaffolder ¶
func NewScaffolder(cfg v1alpha1.Cluster, writer io.Writer) *Scaffolder
NewScaffolder creates a new Scaffolder instance with the provided KSail cluster configuration.
Click to show internal directories.
Click to hide internal directories.