@@ -62,7 +62,8 @@ type LinodeMachineSpec struct {
6262 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
6363 Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces,omitempty"`
6464 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
65- LinodeInterfaces []linodego.LinodeInterfaceCreateOptions `json:"linodeInterfaces,omitempty"`
65+ // +kubebuilder:object:generate=true
66+ LinodeInterfaces []LinodeInterfaceCreateOptions `json:"linodeInterfaces,omitempty"`
6667 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
6768 BackupsEnabled bool `json:"backupsEnabled,omitempty"`
6869 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
@@ -196,6 +197,81 @@ type InstanceConfigInterfaceCreateOptions struct {
196197 IPRanges []string `json:"ipRanges,omitempty"`
197198}
198199
200+ type LinodeInterfaceCreateOptions struct {
201+ FirewallID * int `json:"firewall_id,omitempty"`
202+ DefaultRoute * InterfaceDefaultRoute `json:"default_route,omitempty"`
203+ Public * PublicInterfaceCreateOptions `json:"public,omitempty"`
204+ VPC * VPCInterfaceCreateOptions `json:"vpc,omitempty"`
205+ VLAN * VLANInterface `json:"vlan,omitempty"`
206+ }
207+
208+ type InterfaceDefaultRoute struct {
209+ IPv4 * bool `json:"ipv4,omitempty"`
210+ IPv6 * bool `json:"ipv6,omitempty"`
211+ }
212+
213+ type PublicInterfaceCreateOptions struct {
214+ IPv4 * PublicInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
215+ IPv6 * PublicInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
216+ }
217+
218+ type PublicInterfaceIPv4CreateOptions struct {
219+ Addresses []PublicInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
220+ }
221+
222+ type PublicInterfaceIPv4AddressCreateOptions struct {
223+ Address string `json:"address"`
224+ Primary * bool `json:"primary,omitempty"`
225+ }
226+
227+ type PublicInterfaceIPv6CreateOptions struct {
228+ Ranges []PublicInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
229+ }
230+
231+ type PublicInterfaceIPv6RangeCreateOptions struct {
232+ Range string `json:"range"`
233+ }
234+
235+ type VPCInterfaceCreateOptions struct {
236+ SubnetID int `json:"subnet_id"`
237+ IPv4 * VPCInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
238+ IPv6 * VPCInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
239+ }
240+
241+ type VPCInterfaceIPv6CreateOptions struct {
242+ SLAAC []VPCInterfaceIPv6SLAACCreateOptions `json:"slaac,omitempty"`
243+ Ranges []VPCInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
244+ IsPublic bool `json:"is_public"`
245+ }
246+
247+ type VPCInterfaceIPv6SLAACCreateOptions struct {
248+ Range string `json:"range"`
249+ }
250+
251+ type VPCInterfaceIPv6RangeCreateOptions struct {
252+ Range string `json:"range"`
253+ }
254+
255+ type VPCInterfaceIPv4CreateOptions struct {
256+ Addresses []VPCInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
257+ Ranges []VPCInterfaceIPv4RangeCreateOptions `json:"ranges,omitempty"`
258+ }
259+
260+ type VPCInterfaceIPv4AddressCreateOptions struct {
261+ Address string `json:"address"`
262+ Primary * bool `json:"primary,omitempty"`
263+ NAT1To1Address * string `json:"nat_1_1_address,omitempty"`
264+ }
265+
266+ type VPCInterfaceIPv4RangeCreateOptions struct {
267+ Range string `json:"range"`
268+ }
269+
270+ type VLANInterface struct {
271+ VLANLabel string `json:"vlan_label"`
272+ IPAMAddress * string `json:"ipam_address,omitempty"`
273+ }
274+
199275// VPCIPv4 defines VPC IPV4 settings
200276type VPCIPv4 struct {
201277 VPC string `json:"vpc,omitempty"`
0 commit comments