Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSpec ¶
func BuildSpec(input BuildInput) (*openchoreov1alpha1.ComponentReleaseSpec, error)
BuildSpec assembles a ComponentReleaseSpec from resolved resources. Both the controller and API service use this to ensure consistent spec construction.
func FindTraitSpec ¶
func FindTraitSpec(traits []openchoreov1alpha1.ComponentReleaseTrait, kind openchoreov1alpha1.TraitRefKind, name string) (openchoreov1alpha1.TraitSpec, bool)
FindTraitSpec searches the release traits slice for an entry matching kind and name, returning a copy of its Spec. Returns an empty TraitSpec and false if not found.
Types ¶
type BuildInput ¶
type BuildInput struct {
Component *openchoreov1alpha1.Component
ComponentType openchoreov1alpha1.ComponentReleaseComponentType
Traits map[string]openchoreov1alpha1.TraitSpec
ClusterTraits map[string]openchoreov1alpha1.ClusterTraitSpec
Workload *openchoreov1alpha1.WorkloadTemplateSpec
}
BuildInput holds the resolved resources needed to assemble a ComponentReleaseSpec. Traits and ClusterTraits are separate maps keyed by trait name. Callers handle fetching, ClusterTrait→TraitSpec conversion, and deduplication. BuildSpec merges both maps into a single Traits field on the ComponentReleaseSpec.
Click to show internal directories.
Click to hide internal directories.