vmware

package
v0.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package vmware provides the VMware platform implementation.

Package vmware provides the VMware platform implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPOverrides

type DHCPOverrides struct {
	Hostname     string `yaml:"hostname,omitempty"`
	RouteMetric  uint32 `yaml:"route-metric,omitempty"`
	SendHostname string `yaml:"send-hostname,omitempty"`
	UseDNS       string `yaml:"use-dns,omitempty"`
	UseDomains   string `yaml:"use-domains,omitempty"`
	UseHostname  string `yaml:"use-hostname,omitempty"`
	UseMTU       string `yaml:"use-mtu,omitempty"`
	UseNTP       string `yaml:"use-ntp,omitempty"`
	UseRoutes    string `yaml:"use-routes,omitempty"`
}

DHCPOverrides is partial implemented. Only RouteMetric is use, the other elements are not processed.

type Ethernet

type Ethernet struct {
	Match struct {
		Name   string `yaml:"name,omitempty"`
		HWAddr string `yaml:"macaddress,omitempty"`
	} `yaml:"match,omitempty"`
	SetName        string        `yaml:"set-name,omitempty"`
	Wakeonlan      bool          `yaml:"wakeonlan,omitempty"`
	DHCPv4         bool          `yaml:"dhcp4,omitempty"`
	DHCP4Overrides DHCPOverrides `yaml:"dhcp4-overrides,omitempty"`
	DHCPv6         bool          `yaml:"dhcp6,omitempty"`
	DHCP6Overrides DHCPOverrides `yaml:"dhcp6-overrides,omitempty"`
	Address        []string      `yaml:"addresses,omitempty"`
	Gateway4       string        `yaml:"gateway4,omitempty"`
	Gateway6       string        `yaml:"gateway6,omitempty"`
	MTU            int           `yaml:"mtu,omitempty"`
	NameServers    struct {
		Search  []string `yaml:"search,omitempty"`
		Address []string `yaml:"addresses,omitempty"`
	} `yaml:"nameservers,omitempty"`
	Routes []Route `yaml:"routes,omitempty"`
}

Ethernet holds network interface info.

type NetworkConfig

type NetworkConfig struct {
	InstanceID    string `yaml:"instance-id"`
	LocalHostname string `yaml:"local-hostname"`
	// Talos doesn't block on network, it will reconfigure itself as network information becomes available. WaitOnNetwork is not used.
	WaitOnNetwork struct {
		Ipv4 bool `yaml:"ipv4"`
		Ipv6 bool `yaml:"ipv6"`
	} `yaml:"wait-on-network,omitempty"`
	Network struct {
		Version   int                 `yaml:"version"`
		Ethernets map[string]Ethernet `yaml:"ethernets"`
	}
	Routes []Route `yaml:"routes,omitempty"`
}

NetworkConfig maps to VMware GuestInfo metadata. See also definition of GuestInfo in CAPV https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/main/pkg/util/constants.go

type Route

type Route struct {
	To     string `yaml:"to,omitempty"`
	Via    string `yaml:"via,omitempty"`
	Metric string `yaml:"metric,omitempty"`
}

Route configuration. Not used.

type VMware

type VMware struct{}

VMware is the concrete type that implements the platform.Platform interface.

func (*VMware) ApplyNetworkConfigV2

func (v *VMware) ApplyNetworkConfigV2(ctx context.Context, st state.State, config *NetworkConfig, networkConfig *runtime.PlatformNetworkConfig) error

ApplyNetworkConfigV2 gets GuestInfo and applies to the Talos runtime platform network configuration.

func (*VMware) Configuration

func (v *VMware) Configuration(context.Context, state.State) ([]byte, error)

Configuration implements the platform.Platform interface.

func (*VMware) KernelArgs

func (v *VMware) KernelArgs(string) procfs.Parameters

KernelArgs implements the runtime.Platform interface.

func (*VMware) Mode

func (v *VMware) Mode() runtime.Mode

Mode implements the platform.Platform interface.

func (*VMware) Name

func (v *VMware) Name() string

Name implements the platform.Platform interface.

func (*VMware) NetworkConfiguration

func (v *VMware) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error

NetworkConfiguration implements the runtime.Platform interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL