Documentation ¶
Index ¶
- func ProcessCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
- func ProcessControlPlaneObjects[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
- func ProcessEtcdCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
- func ProcessKubeadmControlPlane[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
- func ProcessProviderCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
- func ProcessWorkerGroupObjects[M clusterapi.Object](g *clusterapi.WorkerGroup[M], lookup yamlutil.ObjectLookup)
- func ProcessWorkerObjects[M clusterapi.Object](w *clusterapi.Workers[M], lookup yamlutil.ObjectLookup)
- func RegisterControlPlaneMappings(parser *yamlutil.Parser) error
- func RegisterWorkerMappings(parser *yamlutil.Parser) error
- type ControlPlaneBuilder
- type WorkersBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProcessCluster ¶
func ProcessCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
ProcessCluster finds the CAPI cluster in the parsed objects and sets it in ControlPlane
func ProcessControlPlaneObjects ¶
func ProcessControlPlaneObjects[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
ProcessControlPlaneObjects finds all necessary objects in the parsed objects and sets them in the ControlPlane
func ProcessEtcdCluster ¶
func ProcessEtcdCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
ProcessEtcdCluster finds the CAPI etcdadm cluster (for unstacked clusters) in the parsed objects and sets it in ControlPlane
func ProcessKubeadmControlPlane ¶
func ProcessKubeadmControlPlane[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
ProcessKubeadmControlPlane finds the CAPI kubeadm control plane and the kubeadm control plane machine template in the parsed objects and sets it in ControlPlane
func ProcessProviderCluster ¶
func ProcessProviderCluster[C, M clusterapi.Object](cp *clusterapi.ControlPlane[C, M], lookup yamlutil.ObjectLookup)
ProcessCluster finds the provider cluster in the parsed objects and sets it in ControlPlane
func ProcessWorkerGroupObjects ¶
func ProcessWorkerGroupObjects[M clusterapi.Object](g *clusterapi.WorkerGroup[M], lookup yamlutil.ObjectLookup)
ProcessWorkerGroupObjects looks in the parsed objects for the KubeadmConfigTemplate and the provider machine template referenced in the MachineDeployment and sets them in the WorkerGroup. MachineDeployment needs to be already set in the WorkerGroup
func ProcessWorkerObjects ¶
func ProcessWorkerObjects[M clusterapi.Object](w *clusterapi.Workers[M], lookup yamlutil.ObjectLookup)
ProcessWorkerObjects finds all necessary objects in the parsed objects and sets them in Workers
func RegisterControlPlaneMappings ¶
RegisterControlPlaneMappings records the basic mappings for CAPI cluster, kubeadmcontrolplane and etcdadm cluster in a Parser
func RegisterWorkerMappings ¶
RegisterWorkerMappings records the basic mappings for CAPI MachineDeployment and KubeadmConfigTemplate in a Parser
Types ¶
type ControlPlaneBuilder ¶
type ControlPlaneBuilder[C, M clusterapi.Object] struct { ControlPlane *clusterapi.ControlPlane[C, M] }
ControlPlaneBuilder implements yamlutil.Builder It's a wrapper around ControlPlane to provide yaml parsing functionality
func NewControlPlaneBuilder ¶
func NewControlPlaneBuilder[C, M clusterapi.Object]() *ControlPlaneBuilder[C, M]
func NewControlPlaneParserAndBuilder ¶
func NewControlPlaneParserAndBuilder[C, M clusterapi.Object](logger logr.Logger, clusterMapping yamlutil.Mapping[C], machineTemplateMapping yamlutil.Mapping[M]) (*yamlutil.Parser, *ControlPlaneBuilder[C, M], error)
NewControlPlaneParserAndBuilder builds a Parser and a Builder for a particular provider ControlPlane It registers the basic shared mappings plus another two for the provider cluster and machine template For ControlPlane that need to include more objects, wrap around the provider builder and implement BuildFromParsed Any extra mappings will need to be registered manually in the Parser
func (*ControlPlaneBuilder[C, M]) BuildFromParsed ¶
func (cp *ControlPlaneBuilder[C, M]) BuildFromParsed(lookup yamlutil.ObjectLookup) error
BuildFromParsed reads parsed objects in ObjectLookup and sets them in the ControlPlane
type WorkersBuilder ¶
type WorkersBuilder[M clusterapi.Object] struct { Workers *clusterapi.Workers[M] }
WorkersBuilder implements yamlutil.Builder It's a wrapper around Workers to provide yaml parsing functionality
func NewWorkersBuilder ¶
func NewWorkersBuilder[M clusterapi.Object]() *WorkersBuilder[M]
func NewWorkersParserAndBuilder ¶
func NewWorkersParserAndBuilder[M clusterapi.Object]( logger logr.Logger, machineTemplateMapping yamlutil.Mapping[M], ) (*yamlutil.Parser, *WorkersBuilder[M], error)
NewWorkersParserAndBuilder builds a Parser and a Builder for a particular provider Workers It registers the basic shared mappings plus another one for the provider machine template For worker specs that need to include more objects, wrap around the provider builder and implement BuildFromParsed. Any extra mappings will need to be registered manually in the Parser
func (*WorkersBuilder[M]) BuildFromParsed ¶
func (cp *WorkersBuilder[M]) BuildFromParsed(lookup yamlutil.ObjectLookup) error
BuildFromParsed reads parsed objects in ObjectLookup and sets them in the Workers