Documentation
¶
Index ¶
- Variables
- func BuildScheme() *runtime.Scheme
- func DefaultCacheDir() string
- func InterfaceForIP(ip net.IP) (string, error)
- func InterfaceIPv4(name string) (net.IP, error)
- func LeaderElectionID(site string) string
- func OutboundIP() (net.IP, error)
- func PrintConfig(key, value string)
- func PrintReady()
- func PrintService(protocol, address string)
- func PrintStep(msg string)
- func ServePXECmd() *cobra.Command
- func SiteSelector(site string) (labels.Selector, error)
- type ClusterInfoWatcher
- type StatusUpdater
Constants ¶
This section is empty.
Variables ¶
var DefaultNetbootImage = "netboot:latest"
DefaultNetbootImage is the default netboot OCI image used when a Machine omits spec.host.netboot.netbootImage. It is set at build time via -ldflags.
Functions ¶
func BuildScheme ¶
func DefaultCacheDir ¶
func DefaultCacheDir() string
func InterfaceForIP ¶
InterfaceForIP returns the name of the network interface that holds the given IP address.
func LeaderElectionID ¶
func OutboundIP ¶
func PrintConfig ¶
func PrintConfig(key, value string)
func PrintReady ¶
func PrintReady()
func PrintService ¶
func PrintService(protocol, address string)
func ServePXECmd ¶
ServePXECmd returns a cobra.Command that runs PXE servers and the BMC control loop.
Types ¶
type ClusterInfoWatcher ¶
type ClusterInfoWatcher struct {
// contains filtered or unexported fields
}
ClusterInfoWatcher watches the cluster-info ConfigMap in the kube-public namespace and provides up-to-date API server URL and CA certificate to the FileResolver through the ClusterInfoProvider interface.
It combines an informer for prompt pickup where cluster-info is published with a periodic re-resolve (clusterInfoPollInterval) as a provider-agnostic floor: clusters that do not publish cluster-info (e.g. AKS) deliver no ConfigMap event, and in-cluster service-account CA rotation is a file change the ConfigMap informer cannot observe, so the poll keeps the CA current on every cluster. When the operator injects METALMAN_APISERVER_URL the served URL is pinned to that value and only the CA is refreshed; without an override the cluster-info URL is refreshed too.
func NewClusterInfoWatcher ¶
func NewClusterInfoWatcher( ctx context.Context, clientset kubernetes.Interface, log *slog.Logger, ) (*ClusterInfoWatcher, error)
NewClusterInfoWatcher creates a watcher that resolves the API server URL and CA certificate from the cluster-info ConfigMap in kube-public. It performs an initial synchronous resolve so that values are available before the first template render.
If the METALMAN_APISERVER_URL environment variable is set, its value overrides the API server URL from the ConfigMap on every refresh. When cluster-info is unavailable (e.g. AKS), the API server URL comes from that override and the CA from the in-cluster service-account mount.
func (*ClusterInfoWatcher) ClusterInfo ¶
func (w *ClusterInfoWatcher) ClusterInfo() netboot.ClusterInfo
ClusterInfo returns the current cluster-info snapshot. Safe for concurrent use.
func (*ClusterInfoWatcher) Start ¶
func (w *ClusterInfoWatcher) Start(ctx context.Context) error
Start implements manager.Runnable. It watches the cluster-info ConfigMap in kube-public for prompt updates and, on a fixed interval, re-resolves the API server URL and CA certificate regardless of provider.