Versions in this module Expand all Collapse all v0 v0.2.1 Sep 5, 2024 Changes in this version type ControlPlane + InfraResources map[string]*unstructured.Unstructured + KthreesConfigs map[string]*bootstrapv1.KThreesConfig + func (c *ControlPlane) SetPatchHelpers(patchHelpers map[string]*patch.Helper) v0.2.0 Jun 17, 2024 Changes in this version + const DefaultK3sConfigLocation + const EtcdRemoveAnnotation + const EtcdRemovedNodeAnnotation + const KThreesControlPlaneControllerName + var ErrControlPlaneMinNodes = errors.New(...) + var ErrFailedToCreatePatchHelper = errors.New("failed to create patch for machine") + var ErrFailedToPickForDeletion = errors.New("failed to pick machine to mark for deletion") + var ErrInvalidCoreDNSVersion = errors.New("invalid CoreDNS version given") + func ControlPlaneLabelsForCluster(clusterName string, ...) map[string]string + type ClusterStatus struct + HasK3sServingSecret bool + Nodes int32 + ReadyNodes int32 + type ControlPlane struct + Cluster *clusterv1.Cluster + KCP *controlplanev1.KThreesControlPlane + Machines collections.Machines + func NewControlPlane(ctx context.Context, client client.Client, cluster *clusterv1.Cluster, ...) (*ControlPlane, error) + func (c *ControlPlane) AsOwnerReference() *metav1.OwnerReference + func (c *ControlPlane) EtcdImageData() (string, string) + func (c *ControlPlane) FailureDomainWithMostMachines(ctx context.Context, machines collections.Machines) *string + func (c *ControlPlane) FailureDomains() clusterv1.FailureDomains + func (c *ControlPlane) GenerateKThreesConfig(spec *bootstrapv1.KThreesConfigSpec) *bootstrapv1.KThreesConfig + func (c *ControlPlane) HasDeletingMachine() bool + func (c *ControlPlane) HasHealthyMachineStillProvisioning() bool + func (c *ControlPlane) HasUnhealthyMachine() bool + func (c *ControlPlane) HealthyMachines() collections.Machines + func (c *ControlPlane) InfrastructureTemplate() *corev1.ObjectReference + func (c *ControlPlane) InitialControlPlaneConfig() *bootstrapv1.KThreesConfigSpec + func (c *ControlPlane) IsEtcdManaged() bool + func (c *ControlPlane) JoinControlPlaneConfig() *bootstrapv1.KThreesConfigSpec + func (c *ControlPlane) MachineInFailureDomainWithMostMachines(ctx context.Context, machines collections.Machines) (*clusterv1.Machine, error) + func (c *ControlPlane) MachineWithDeleteAnnotation(machines collections.Machines) collections.Machines + func (c *ControlPlane) MachinesNeedingRollout() collections.Machines + func (c *ControlPlane) NeedsReplacementNode() bool + func (c *ControlPlane) NewMachine(infraRef, bootstrapRef *corev1.ObjectReference, failureDomain *string) *clusterv1.Machine + func (c *ControlPlane) NextFailureDomainForScaleUp(ctx context.Context) *string + func (c *ControlPlane) PatchMachines(ctx context.Context) error + func (c *ControlPlane) UnhealthyMachines() collections.Machines + func (c *ControlPlane) UpToDateMachines() collections.Machines + func (c *ControlPlane) Version() *string + type CoreDNSMigrator struct + func (c *CoreDNSMigrator) Migrate(fromCoreDNSVersion, toCoreDNSVersion, corefile string, deprecations bool) (string, error) + type EtcdClientGenerator struct + func NewEtcdClientGenerator(restConfig *rest.Config, tlsConfig *tls.Config, ...) *EtcdClientGenerator + type K3sAgentConfig struct + KubeProxyArgs []string + KubeletArgs []string + NodeLabels []string + NodeName string + NodeTaints []string + PrivateRegistry string + Server string + Token string + func GenerateWorkerConfig(serverURL string, token string, serverConfig bootstrapv1.KThreesServerConfig, ...) K3sAgentConfig + type K3sServerConfig struct + AdvertiseAddress string + AdvertisePort string + BindAddress string + ClusterCidr string + ClusterDNS string + ClusterDomain string + ClusterInit bool + DisableCloudController bool + DisableComponents []string + HTTPSListenPort string + KubeAPIServerArgs []string + KubeControllerManagerArgs []string + KubeSchedulerArgs []string + ServiceCidr string + SystemDefaultRegistry string + TLSSan []string + func GenerateInitControlPlaneConfig(controlPlaneEndpoint string, token string, ...) K3sServerConfig + func GenerateJoinControlPlaneConfig(serverURL string, token string, controlplaneendpoint string, ...) K3sServerConfig + type Management struct + Client client.Reader + EtcdCallTimeout time.Duration + EtcdDialTimeout time.Duration + func (m *Management) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error + func (m *Management) GetMachinesForCluster(ctx context.Context, cluster client.ObjectKey, filters ...collections.Func) (collections.Machines, error) + func (m *Management) GetWorkloadCluster(ctx context.Context, clusterKey client.ObjectKey) (*Workload, error) + func (m *Management) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error + type ManagementCluster interface + GetMachinesForCluster func(ctx context.Context, cluster client.ObjectKey, filters ...collections.Func) (collections.Machines, error) + GetWorkloadCluster func(ctx context.Context, clusterKey client.ObjectKey) (*Workload, error) + type RemoteClusterConnectionError struct + Err error + Name string + func (e *RemoteClusterConnectionError) Error() string + func (e *RemoteClusterConnectionError) Unwrap() error + type Workload struct + Client ctrlclient.Client + ClientRestConfig *rest.Config + CoreDNSMigrator coreDNSMigrator + func (w *Workload) ClusterStatus(ctx context.Context) (ClusterStatus, error) + func (w *Workload) EtcdMembers(ctx context.Context) ([]string, error) + func (w *Workload) ForwardEtcdLeadership(ctx context.Context, machine *clusterv1.Machine, ...) error + func (w *Workload) ReconcileEtcdMembers(ctx context.Context, nodeNames []string) ([]string, error) + func (w *Workload) RemoveEtcdMemberForMachine(ctx context.Context, machine *clusterv1.Machine) (bool, error) + func (w *Workload) UpdateAgentConditions(ctx context.Context, controlPlane *ControlPlane) + func (w *Workload) UpdateCoreDNS(ctx context.Context, kcp *controlplanev1.KThreesControlPlane) error + func (w *Workload) UpdateEtcdConditions(ctx context.Context, controlPlane *ControlPlane) + type WorkloadCluster interface + ClusterStatus func(ctx context.Context) (ClusterStatus, error) + ForwardEtcdLeadership func(ctx context.Context, machine *clusterv1.Machine, ...) error + ReconcileEtcdMembers func(ctx context.Context, nodeNames []string) ([]string, error) + RemoveEtcdMemberForMachine func(ctx context.Context, machine *clusterv1.Machine) (bool, error) + UpdateAgentConditions func(ctx context.Context, controlPlane *ControlPlane) + UpdateEtcdConditions func(ctx context.Context, controlPlane *ControlPlane)