@@ -59,8 +59,13 @@ type LinodeMachineSpec struct {
59
59
BackupID int `json:"backupID,omitempty"`
60
60
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
61
61
Image string `json:"image,omitempty"`
62
+ // Interfaces is a list of legacy network interfaces to use for the instance.
62
63
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
63
64
Interfaces []InstanceConfigInterfaceCreateOptions `json:"interfaces,omitempty"`
65
+ // LinodeInterfaces is a list of Linode network interfaces to use for the instance. Requires Linode Interfaces beta opt-in to use.
66
+ // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
67
+ // +kubebuilder:object:generate=true
68
+ LinodeInterfaces []LinodeInterfaceCreateOptions `json:"linodeInterfaces,omitempty"`
64
69
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
65
70
BackupsEnabled bool `json:"backupsEnabled,omitempty"`
66
71
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
@@ -125,6 +130,13 @@ type LinodeMachineSpec struct {
125
130
// For more information, see https://techdocs.akamai.com/cloud-computing/docs/automatically-configure-networking
126
131
// Defaults to true.
127
132
NetworkHelper * bool `json:"networkHelper,omitempty"`
133
+
134
+ // InterfaceGeneration is the generation of the interface to use for the cluster's
135
+ // nodes in interface / linodeInterface are not specified for a LinodeMachine.
136
+ // If not set, defaults to "legacy_config".
137
+ // +kubebuilder:validation:Enum=legacy_config;linode
138
+ // +kubebuilder:default=legacy_config
139
+ InterfaceGeneration linodego.InterfaceGeneration `json:"interfaceGeneration,omitempty"`
128
140
}
129
141
130
142
// IPv6CreateOptions defines the IPv6 options for the instance.
@@ -194,6 +206,96 @@ type InstanceConfigInterfaceCreateOptions struct {
194
206
IPRanges []string `json:"ipRanges,omitempty"`
195
207
}
196
208
209
+ // LinodeInterfaceCreateOptions defines the linode network interface config
210
+ type LinodeInterfaceCreateOptions struct {
211
+ FirewallID * int `json:"firewall_id,omitempty"`
212
+ DefaultRoute * InterfaceDefaultRoute `json:"default_route,omitempty"`
213
+ Public * PublicInterfaceCreateOptions `json:"public,omitempty"`
214
+ VPC * VPCInterfaceCreateOptions `json:"vpc,omitempty"`
215
+ VLAN * VLANInterface `json:"vlan,omitempty"`
216
+ }
217
+
218
+ // InterfaceDefaultRoute defines the default IPv4 and IPv6 routes for an interface
219
+ type InterfaceDefaultRoute struct {
220
+ IPv4 * bool `json:"ipv4,omitempty"`
221
+ IPv6 * bool `json:"ipv6,omitempty"`
222
+ }
223
+
224
+ // PublicInterfaceCreateOptions defines the IPv4 and IPv6 public interface create options
225
+ type PublicInterfaceCreateOptions struct {
226
+ IPv4 * PublicInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
227
+ IPv6 * PublicInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
228
+ }
229
+
230
+ // PublicInterfaceIPv4CreateOptions defines the PublicInterfaceIPv4AddressCreateOptions for addresses
231
+ type PublicInterfaceIPv4CreateOptions struct {
232
+ Addresses []PublicInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
233
+ }
234
+
235
+ // PublicInterfaceIPv4AddressCreateOptions defines the public IPv4 address and whether it is primary
236
+ type PublicInterfaceIPv4AddressCreateOptions struct {
237
+ Address string `json:"address"`
238
+ Primary * bool `json:"primary,omitempty"`
239
+ }
240
+
241
+ // PublicInterfaceIPv6CreateOptions defines the PublicInterfaceIPv6RangeCreateOptions
242
+ type PublicInterfaceIPv6CreateOptions struct {
243
+ Ranges []PublicInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
244
+ }
245
+
246
+ // PublicInterfaceIPv6RangeCreateOptions defines the IPv6 range for a public interface
247
+ type PublicInterfaceIPv6RangeCreateOptions struct {
248
+ Range string `json:"range"`
249
+ }
250
+
251
+ // VPCInterfaceCreateOptions defines the VPC interface configuration for an instance
252
+ type VPCInterfaceCreateOptions struct {
253
+ SubnetID int `json:"subnet_id"`
254
+ IPv4 * VPCInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
255
+ IPv6 * VPCInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
256
+ }
257
+
258
+ // VPCInterfaceIPv6CreateOptions defines the IPv6 configuration for a VPC interface
259
+ type VPCInterfaceIPv6CreateOptions struct {
260
+ SLAAC []VPCInterfaceIPv6SLAACCreateOptions `json:"slaac,omitempty"`
261
+ Ranges []VPCInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
262
+ IsPublic bool `json:"is_public"`
263
+ }
264
+
265
+ // VPCInterfaceIPv6SLAACCreateOptions defines the Range for IPv6 SLAAC
266
+ type VPCInterfaceIPv6SLAACCreateOptions struct {
267
+ Range string `json:"range"`
268
+ }
269
+
270
+ // VPCInterfaceIPv6RangeCreateOptions defines the IPv6 range for a VPC interface
271
+ type VPCInterfaceIPv6RangeCreateOptions struct {
272
+ Range string `json:"range"`
273
+ }
274
+
275
+ // VPCInterfaceIPv4CreateOptions defines the IPv4 address and range configuration for a VPC interface
276
+ type VPCInterfaceIPv4CreateOptions struct {
277
+ Addresses []VPCInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
278
+ Ranges []VPCInterfaceIPv4RangeCreateOptions `json:"ranges,omitempty"`
279
+ }
280
+
281
+ // VPCInterfaceIPv4AddressCreateOptions defines the IPv4 configuration for a VPC interface
282
+ type VPCInterfaceIPv4AddressCreateOptions struct {
283
+ Address string `json:"address"`
284
+ Primary * bool `json:"primary,omitempty"`
285
+ NAT1To1Address * string `json:"nat_1_1_address,omitempty"`
286
+ }
287
+
288
+ // VPCInterfaceIPv4RangeCreateOptions defines the IPv4 range for a VPC interface
289
+ type VPCInterfaceIPv4RangeCreateOptions struct {
290
+ Range string `json:"range"`
291
+ }
292
+
293
+ // VLANInterface defines the VLAN interface configuration for an instance
294
+ type VLANInterface struct {
295
+ VLANLabel string `json:"vlan_label"`
296
+ IPAMAddress * string `json:"ipam_address,omitempty"`
297
+ }
298
+
197
299
// VPCIPv4 defines VPC IPV4 settings
198
300
type VPCIPv4 struct {
199
301
VPC string `json:"vpc,omitempty"`
0 commit comments