Documentation
¶
Index ¶
Constants ¶
const ( DefaultFileInclude = "**/*" StepTypeTemplate = "template" StepTypeKustomize = "kustomize" StepTypeHelm = "helm" StepTypeSplit = "split" StepTypeGenerate = "generate" SplitByKind = "kind" SplitByResource = "resource" SplitByGroup = "group" SplitByKindDir = "kind-dir" SplitByCustom = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileFilter ¶
FileFilter defines include/exclude glob patterns.
type GenerateConfig ¶ added in v1.4.0
GenerateConfig configures the generate step.
type HelmConfig ¶
type HelmConfig struct {
Chart string `yaml:"chart"`
ReleaseName string `yaml:"releaseName"`
Namespace string `yaml:"namespace"`
ValuesFiles []string `yaml:"valuesFiles"`
Set map[string]string `yaml:"set"`
}
HelmConfig configures the helm step.
type Instance ¶ added in v1.4.0
type Instance struct {
Name string `yaml:"name"`
Input string `yaml:"input"`
Output string `yaml:"output"`
Include []string `yaml:"include"`
Context map[string]any `yaml:"context"`
}
Instance defines a single instance in instances mode.
type InstancesConfig ¶ added in v1.4.0
type InstancesConfig struct {
Instances []Instance `yaml:"instances"`
}
InstancesConfig is the top-level instances file format.
func LoadInstances ¶ added in v1.4.0
func LoadInstances(filename string) (*InstancesConfig, error)
LoadInstances reads an instances YAML file, unmarshals it, and validates.
func (*InstancesConfig) Validate ¶ added in v1.4.0
func (c *InstancesConfig) Validate() error
Validate checks the instances configuration for errors.
type KustomizeConfig ¶
KustomizeConfig configures the kustomize step.
type Pipeline ¶
type Pipeline struct {
Context map[string]any `yaml:"context"`
Pipeline []StepConfig `yaml:"pipeline"`
// Set by the loader, not from YAML.
Dir string `yaml:"-"`
FilePath string `yaml:"-"`
}
Pipeline is the .many.yaml configuration format.
func LoadPipeline ¶
LoadPipeline reads a .many.yaml file, sets Dir/FilePath, and validates it.
type SplitConfig ¶
type SplitConfig struct {
Input string `yaml:"input"`
By string `yaml:"by"`
OutputDir string `yaml:"outputDir"`
FileNameTemplate string `yaml:"fileNameTemplate"`
CanonicalKeyOrder *bool `yaml:"canonicalKeyOrder,omitempty"` // default true
}
SplitConfig configures the split step.
type StepConfig ¶
type StepConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Template *TemplateConfig `yaml:"template,omitempty"`
Kustomize *KustomizeConfig `yaml:"kustomize,omitempty"`
Helm *HelmConfig `yaml:"helm,omitempty"`
Split *SplitConfig `yaml:"split,omitempty"`
Generate *GenerateConfig `yaml:"generate,omitempty"`
}
StepConfig defines a single step within a pipeline.
type TemplateConfig ¶
type TemplateConfig struct {
Files FileFilter `yaml:"files"`
}
TemplateConfig configures the template step.