Documentation ¶
Overview ¶
Package cloudinit implements kubeadm cloudinit functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingHostname returns an error if required hostname is empty. ErrMissingHostname = errors.New("hostname is not set") // ErrMissingInstanceID returns an error if required hostname is empty. ErrMissingInstanceID = errors.New("instance-id is not set") // ErrMissingIPAddress returns an error if required ip address is empty. ErrMissingIPAddress = errors.New("ip address is not set") // ErrMalformedIPAddress returns an error if ip address is malformed. ErrMalformedIPAddress = errors.New("malformed ip address") // ErrMissingGateway returns an error if required gateway is empty. ErrMissingGateway = errors.New("gateway is not set") // ErrConflictingMetrics returns an error if a metric for a route already exists. ErrConflictingMetrics = errors.New("metric already exists for default gateway") // ErrMissingMacAddress returns an error if required mac address is empty. ErrMissingMacAddress = errors.New("mac address is not set") // ErrMissingNetworkConfigData returns an error if required network config data is empty. ErrMissingNetworkConfigData = errors.New("network config data is not set") // ErrMissingIPAddresses returns an error if required ip addresses is empty. ErrMissingIPAddresses = errors.New("ip addresses is not set") // ErrMalformedRoute is returned if a route can not be assembled by netplan. ErrMalformedRoute = errors.New("route is malformed") // ErrMalformedFIBRule is returned if a FIB rule can not be assembled by netplan. ErrMalformedFIBRule = errors.New("routing policy is malformed") )
Functions ¶
This section is empty.
Types ¶
type BaseCloudInitData ¶
type BaseCloudInitData struct { Hostname string InstanceID string NetworkConfigData []NetworkConfigData }
BaseCloudInitData is shared across all the various types of files written to disk. used to render cloudinit.
type FIBRuleData ¶ added in v0.3.0
FIBRuleData stores forward information base rules (routing policies).
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata provides functionality to render machine metadata.
func NewMetadata ¶
NewMetadata returns a new Metadata object.
type NetworkConfig ¶
type NetworkConfig struct {
// contains filtered or unexported fields
}
NetworkConfig provides functionality to render machine network-config.
func NewNetworkConfig ¶
func NewNetworkConfig(configs []NetworkConfigData) *NetworkConfig
NewNetworkConfig returns a new NetworkConfig object.
func (*NetworkConfig) Render ¶
func (r *NetworkConfig) Render() ([]byte, error)
Render returns rendered network-config.
type NetworkConfigData ¶
type NetworkConfigData struct { ProxName string // Device name in Proxmox MacAddress string DHCP4 bool DHCP6 bool IPAddress string IPV6Address string Gateway string Metric *uint32 Gateway6 string Metric6 *uint32 DNSServers []string Type string Name string Interfaces []string // Interfaces controlled by this one. Table uint32 // linux routing table number for VRF. Routes []RoutingData FIBRules []FIBRuleData // Forwarding information block for routing. LinkMTU *uint16 // linux network device MTU }
NetworkConfigData is used to render network-config.
Click to show internal directories.
Click to hide internal directories.