Documentation
¶
Index ¶
Constants ¶
const ( ButlerConfigSingletonName = "butler" // LabelAllocationRole distinguishes initial vs growth IPAllocations. // The butler-api does not define this label yet, so it lives here until // the next API release. LabelAllocationRole = "butler.butlerlabs.dev/allocation-role" // AllocationRoleInitial marks the first IPAllocation created during // reconcileIPAllocation (the "seed" allocation for a new tenant). AllocationRoleInitial = "initial" // AllocationRoleGrowth marks IPAllocations created by the elastic IPAM // growth path inside reconcileElasticIPAM. AllocationRoleGrowth = "growth" ReasonValidating = "Validating" ReasonValidationFailed = "ValidationFailed" ReasonTeamNotFound = "TeamNotFound" ReasonTeamRequired = "TeamRequired" ReasonNamespaceMismatch = "NamespaceMismatch" ReasonProvisioningNS = "ProvisioningNamespace" ReasonNamespaceReady = "NamespaceReady" ReasonInfraProvisioning = "InfrastructureProvisioning" ReasonControlPlaneReady = "ControlPlaneReady" ReasonWorkersProvisioning = "WorkersProvisioning" ReasonWorkersReady = "WorkersReady" ReasonProviderConfigNotFound = "ProviderConfigNotFound" ReasonCAPIResourceError = "CAPIResourceError" ReasonReady = "Ready" ReasonAddonInstallFailed = "AddonInstallFailed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddonInstaller ¶ added in v0.20.0
type AddonInstaller interface {
InstallCilium(ctx context.Context, kubeconfig []byte, cfg addons.CiliumConfig) error
InstallCertManager(ctx context.Context, kubeconfig []byte, version string) error
InstallLonghorn(ctx context.Context, kubeconfig []byte, version string) error
InstallMetalLB(ctx context.Context, kubeconfig []byte, version, poolStart, poolEnd string) error
InstallTraefik(ctx context.Context, kubeconfig []byte, version string) error
UpdateMetalLBPool(ctx context.Context, kubeconfig []byte, ranges []string) error
}
AddonInstaller abstracts the addon installation methods consumed by the TenantCluster controller. Defined here (consumer side) rather than in the addons package so the interface stays narrow to actual usage. The concrete implementation is *addons.Installer, which shells out to Helm; this interface enables unit testing of retry logic, condition setting, and event emission without requiring Helm or kubectl. Other controllers that install addons (tenantaddon, managementaddon) use the concrete type directly today but could adopt this pattern in follow-up work.
type LBServiceInventory ¶ added in v0.18.1
type LBServiceInventory struct {
// PendingServices are LB Services without an assigned external IP.
PendingServices []LBServiceSummary
// AssignedPlatformCount is the number of platform-labeled LB Services
// with at least one assigned external IP.
AssignedPlatformCount int32
// AssignedTenantCount is the number of non-platform LB Services with
// at least one assigned external IP.
AssignedTenantCount int32
// ServiceIPs is the set of all external IPs assigned to LB Services.
// Used by orphan detection to identify allocations with no matching service.
ServiceIPs map[string]bool
}
LBServiceInventory is a snapshot of LoadBalancer Service state on a tenant cluster. Built from a single cross-cluster list call per reconcile. reconcileElasticIPAM consumes the full inventory for demand-driven growth and the derived counts for shrink logic.
type LBServiceSummary ¶ added in v0.18.1
LBServiceSummary is a lightweight representation of a LoadBalancer Service on a tenant cluster. Used by the Service inventory to track Pending services for demand-driven growth decisions.
type Reconciler ¶
type Reconciler struct {
client.Client
Scheme *runtime.Scheme
Installer AddonInstaller
ClientManager *tenant.ClientManager
Recorder record.EventRecorder
MaxConcurrentReconciles int
}
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error