Versions in this module Expand all Collapse all v0 v0.1.5 Dec 23, 2022 Changes in this version + const DefaultK3sConfigLocation + const KThreesControlPlaneControllerName + var ErrControlPlaneMinNodes = errors.New(...) + var Log = klogr.New() + func ControlPlaneLabelsForCluster(clusterName string) map[string]string + func PickFewest(failureDomains clusterv1.FailureDomains, machines FilterableMachineCollection) *string + func PickMost(c *ControlPlane, machines FilterableMachineCollection) *string + type ClusterStatus struct + Nodes int32 + ReadyNodes int32 + type ControlPlane struct + Cluster *clusterv1.Cluster + KCP *controlplanev1.KThreesControlPlane + Machines FilterableMachineCollection + 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(machines FilterableMachineCollection) *string + func (c *ControlPlane) FailureDomains() clusterv1.FailureDomains + func (c *ControlPlane) GenerateKThreesConfig(spec *bootstrapv1.KThreesConfigSpec) *bootstrapv1.KThreesConfig + func (c *ControlPlane) HasDeletingMachine() bool + func (c *ControlPlane) HasUnhealthyMachine() bool + func (c *ControlPlane) HealthyMachines() FilterableMachineCollection + 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) Logger() logr.Logger + func (c *ControlPlane) MachineInFailureDomainWithMostMachines(machines FilterableMachineCollection) (*clusterv1.Machine, error) + func (c *ControlPlane) MachineWithDeleteAnnotation(machines FilterableMachineCollection) FilterableMachineCollection + func (c *ControlPlane) MachinesNeedingRollout() FilterableMachineCollection + func (c *ControlPlane) NeedsReplacementNode() bool + func (c *ControlPlane) NewMachine(infraRef, bootstrapRef *corev1.ObjectReference, failureDomain *string) *clusterv1.Machine + func (c *ControlPlane) NextFailureDomainForScaleUp() *string + func (c *ControlPlane) PatchMachines(ctx context.Context) error + func (c *ControlPlane) UnhealthyMachines() FilterableMachineCollection + func (c *ControlPlane) UpToDateMachines() FilterableMachineCollection + func (c *ControlPlane) Version() *string + type CoreDNSMigrator struct + func (c *CoreDNSMigrator) Migrate(fromCoreDNSVersion, toCoreDNSVersion, corefile string, deprecations bool) (string, error) + type FilterableMachineCollection map[string]*clusterv1.Machine + func NewFilterableMachineCollection(machines ...*clusterv1.Machine) FilterableMachineCollection + func NewFilterableMachineCollectionFromMachineList(machineList *clusterv1.MachineList) FilterableMachineCollection + func (s FilterableMachineCollection) AnyFilter(filters ...machinefilters.Func) FilterableMachineCollection + func (s FilterableMachineCollection) ConditionGetters() []conditions.Getter + func (s FilterableMachineCollection) DeepCopy() FilterableMachineCollection + func (s FilterableMachineCollection) Difference(machines FilterableMachineCollection) FilterableMachineCollection + func (s FilterableMachineCollection) Filter(filters ...machinefilters.Func) FilterableMachineCollection + func (s FilterableMachineCollection) Insert(machines ...*clusterv1.Machine) + func (s FilterableMachineCollection) Len() int + func (s FilterableMachineCollection) Names() []string + func (s FilterableMachineCollection) Newest() *clusterv1.Machine + func (s FilterableMachineCollection) Oldest() *clusterv1.Machine + func (s FilterableMachineCollection) SortedByCreationTimestamp() []*clusterv1.Machine + func (s FilterableMachineCollection) UnsortedList() []*clusterv1.Machine + 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, agentConfig bootstrapv1.KThreesAgentConfig) 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 + ServiceCidr string + TLSSan []string + func GenerateInitControlPlaneConfig(controlPlaneEndpoint string, token string, ...) K3sServerConfig + func GenerateJoinControlPlaneConfig(serverUrl string, token string, controlplaneendpoint string, ...) K3sServerConfig + type Management struct + Client ctrlclient.Reader + func (m *Management) Get(ctx context.Context, key ctrlclient.ObjectKey, obj client.Object) error + func (m *Management) GetMachinesForCluster(ctx context.Context, cluster client.ObjectKey, filters ...machinefilters.Func) (FilterableMachineCollection, error) + func (m *Management) GetWorkloadCluster(ctx context.Context, clusterKey client.ObjectKey) (WorkloadCluster, error) + func (m *Management) List(ctx context.Context, list client.ObjectList, opts ...ctrlclient.ListOption) error + type ManagementCluster interface + GetMachinesForCluster func(ctx context.Context, cluster client.ObjectKey, filters ...machinefilters.Func) (FilterableMachineCollection, error) + GetWorkloadCluster func(ctx context.Context, clusterKey client.ObjectKey) (WorkloadCluster, error) + type RemoteClusterConnectionError struct + Err error + Name string + func (e *RemoteClusterConnectionError) Error() string + func (e *RemoteClusterConnectionError) Unwrap() error + type Workload struct + Client ctrlclient.Client + CoreDNSMigrator coreDNSMigrator + func (w *Workload) ClusterStatus(ctx context.Context) (ClusterStatus, 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) + UpdateAgentConditions func(ctx context.Context, controlPlane *ControlPlane) + UpdateEtcdConditions func(ctx context.Context, controlPlane *ControlPlane)