@@ -17,6 +17,7 @@ limitations under the License.
1717package v1beta1
1818
1919import (
20+ corev1 "k8s.io/api/core/v1"
2021 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2122)
2223
@@ -81,12 +82,69 @@ type Topology struct {
8182 // +optional
8283 Networks []string `json:"networks,omitempty"`
8384
85+ // NetworkConfigurations is a list of network configurations within this failure domain.
86+ // +optional
87+ // +listType=map
88+ // +listMapKey=name
89+ NetworkConfigurations []NetworkConfiguration `json:"networkConfigs,omitempty"`
90+
8491 // Datastore is the name or inventory path of the datastore in which the
8592 // virtual machine is created/located.
8693 // +optional
8794 Datastore string `json:"datastore,omitempty"`
8895}
8996
97+ // NetworkConfiguration defines a network configuration that should be used when consuming
98+ // a failure domain.
99+ type NetworkConfiguration struct {
100+ // NetworkName is the network name for this machine's VM.
101+ // +kubebuilder:validation:Required
102+ NetworkName string `json:"name"`
103+
104+ // DHCP4 is a flag that indicates whether or not to use DHCP for IPv4.
105+ // +optional
106+ DHCP4 * bool `json:"dhcp4,omitempty"`
107+
108+ // DHCP6 is a flag that indicates whether or not to use DHCP for IPv6.
109+ // +optional
110+ DHCP6 * bool `json:"dhcp6,omitempty"`
111+
112+ // Nameservers is a list of IPv4 and/or IPv6 addresses used as DNS
113+ // nameservers.
114+ // Please note that Linux allows only three nameservers (https://linux.die.net/man/5/resolv.conf).
115+ // +optional
116+ Nameservers []string `json:"nameservers,omitempty"`
117+
118+ // SearchDomains is a list of search domains used when resolving IP
119+ // addresses with DNS.
120+ // +optional
121+ SearchDomains []string `json:"searchDomains,omitempty"`
122+
123+ // DHCP4Overrides allows for the control over several DHCP behaviors.
124+ // Overrides will only be applied when the corresponding DHCP flag is set.
125+ // Only configured values will be sent, omitted values will default to
126+ // distribution defaults.
127+ // Dependent on support in the network stack for your distribution.
128+ // For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides)
129+ // +optional
130+ DHCP4Overrides * DHCPOverrides `json:"dhcp4Overrides,omitempty"`
131+
132+ // DHCP6Overrides allows for the control over several DHCP behaviors.
133+ // Overrides will only be applied when the corresponding DHCP flag is set.
134+ // Only configured values will be sent, omitted values will default to
135+ // distribution defaults.
136+ // Dependent on support in the network stack for your distribution.
137+ // For more information see the netplan reference (https://netplan.io/reference#dhcp-overrides)
138+ // +optional
139+ DHCP6Overrides * DHCPOverrides `json:"dhcp6Overrides,omitempty"`
140+
141+ // AddressesFromPools is a list of IPAddressPools that should be assigned
142+ // to IPAddressClaims. The machine's cloud-init metadata will be populated
143+ // with IPAddresses fulfilled by an IPAM provider.
144+ // +optional
145+ AddressesFromPools []corev1.TypedLocalObjectReference `json:"addressesFromPools,omitempty"`
146+ }
147+
90148// FailureDomainHosts has information required for placement of machines on VSphere hosts.
91149type FailureDomainHosts struct {
92150 // VMGroupName is the name of the VM group
0 commit comments