Skip to content

Commit 97c7fe5

Browse files
committed
add missing struct descriptions
1 parent 4197d22 commit 97c7fe5

File tree

4 files changed

+95
-15
lines changed

4 files changed

+95
-15
lines changed

api/v1alpha2/linodemachine_types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ type InstanceConfigInterfaceCreateOptions struct {
197197
IPRanges []string `json:"ipRanges,omitempty"`
198198
}
199199

200+
// LinodeInterfaceCreateOptions defines the linode network interface config
200201
type LinodeInterfaceCreateOptions struct {
201202
FirewallID *int `json:"firewall_id,omitempty"`
202203
DefaultRoute *InterfaceDefaultRoute `json:"default_route,omitempty"`
@@ -205,68 +206,82 @@ type LinodeInterfaceCreateOptions struct {
205206
VLAN *VLANInterface `json:"vlan,omitempty"`
206207
}
207208

209+
// InterfaceDefaultRoute defines the default IPv4 and IPv6 routes for an interface
208210
type InterfaceDefaultRoute struct {
209211
IPv4 *bool `json:"ipv4,omitempty"`
210212
IPv6 *bool `json:"ipv6,omitempty"`
211213
}
212214

215+
// PublicInterfaceCreateOptions defines the IPv4 and IPv6 public interface create options
213216
type PublicInterfaceCreateOptions struct {
214217
IPv4 *PublicInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
215218
IPv6 *PublicInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
216219
}
217220

221+
// PublicInterfaceIPv4CreateOptions defines the PublicInterfaceIPv4AddressCreateOptions for addresses
218222
type PublicInterfaceIPv4CreateOptions struct {
219223
Addresses []PublicInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
220224
}
221225

226+
// PublicInterfaceIPv4AddressCreateOptions defines the public IPv4 address and whether it is primary
222227
type PublicInterfaceIPv4AddressCreateOptions struct {
223228
Address string `json:"address"`
224229
Primary *bool `json:"primary,omitempty"`
225230
}
226231

232+
// PublicInterfaceIPv6CreateOptions defines the PublicInterfaceIPv6RangeCreateOptions
227233
type PublicInterfaceIPv6CreateOptions struct {
228234
Ranges []PublicInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
229235
}
230236

237+
// PublicInterfaceIPv6RangeCreateOptions defines the IPv6 range for a public interface
231238
type PublicInterfaceIPv6RangeCreateOptions struct {
232239
Range string `json:"range"`
233240
}
234241

242+
// VPCInterfaceCreateOptions defines the VPC interface configuration for an instance
235243
type VPCInterfaceCreateOptions struct {
236244
SubnetID int `json:"subnet_id"`
237245
IPv4 *VPCInterfaceIPv4CreateOptions `json:"ipv4,omitempty"`
238246
IPv6 *VPCInterfaceIPv6CreateOptions `json:"ipv6,omitempty"`
239247
}
240248

249+
// VPCInterfaceIPv6CreateOptions defines the IPv6 configuration for a VPC interface
241250
type VPCInterfaceIPv6CreateOptions struct {
242251
SLAAC []VPCInterfaceIPv6SLAACCreateOptions `json:"slaac,omitempty"`
243252
Ranges []VPCInterfaceIPv6RangeCreateOptions `json:"ranges,omitempty"`
244253
IsPublic bool `json:"is_public"`
245254
}
246255

256+
// VPCInterfaceIPv6SLAACCreateOptions defines the Range for IPv6 SLAAC
247257
type VPCInterfaceIPv6SLAACCreateOptions struct {
248258
Range string `json:"range"`
249259
}
250260

261+
// VPCInterfaceIPv6RangeCreateOptions defines the IPv6 range for a VPC interface
251262
type VPCInterfaceIPv6RangeCreateOptions struct {
252263
Range string `json:"range"`
253264
}
254265

266+
// VPCInterfaceIPv4CreateOptions defines the IPv4 address and range configuration for a VPC interface
255267
type VPCInterfaceIPv4CreateOptions struct {
256268
Addresses []VPCInterfaceIPv4AddressCreateOptions `json:"addresses,omitempty"`
257269
Ranges []VPCInterfaceIPv4RangeCreateOptions `json:"ranges,omitempty"`
258270
}
259271

272+
// VPCInterfaceIPv4AddressCreateOptions defines the IPv4 configuration for a VPC interface
260273
type VPCInterfaceIPv4AddressCreateOptions struct {
261274
Address string `json:"address"`
262275
Primary *bool `json:"primary,omitempty"`
263276
NAT1To1Address *string `json:"nat_1_1_address,omitempty"`
264277
}
265278

279+
// VPCInterfaceIPv4RangeCreateOptions defines the IPv4 range for a VPC interface
266280
type VPCInterfaceIPv4RangeCreateOptions struct {
267281
Range string `json:"range"`
268282
}
269283

284+
// VLANInterface defines the VLAN interface configuration for an instance
270285
type VLANInterface struct {
271286
VLANLabel string `json:"vlan_label"`
272287
IPAMAddress *string `json:"ipam_address,omitempty"`

config/crd/bases/infrastructure.cluster.x-k8s.io_linodemachines.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,12 @@ spec:
303303
rule: self == oldSelf
304304
linodeInterfaces:
305305
items:
306+
description: LinodeInterfaceCreateOptions defines the linode network
307+
interface config
306308
properties:
307309
default_route:
310+
description: InterfaceDefaultRoute defines the default IPv4
311+
and IPv6 routes for an interface
308312
properties:
309313
ipv4:
310314
type: boolean
@@ -314,11 +318,18 @@ spec:
314318
firewall_id:
315319
type: integer
316320
public:
321+
description: PublicInterfaceCreateOptions defines the IPv4 and
322+
IPv6 public interface create options
317323
properties:
318324
ipv4:
325+
description: PublicInterfaceIPv4CreateOptions defines the
326+
PublicInterfaceIPv4AddressCreateOptions for addresses
319327
properties:
320328
addresses:
321329
items:
330+
description: PublicInterfaceIPv4AddressCreateOptions
331+
defines the public IPv4 address and whether it is
332+
primary
322333
properties:
323334
address:
324335
type: string
@@ -330,9 +341,13 @@ spec:
330341
type: array
331342
type: object
332343
ipv6:
344+
description: PublicInterfaceIPv6CreateOptions defines the
345+
PublicInterfaceIPv6RangeCreateOptions
333346
properties:
334347
ranges:
335348
items:
349+
description: PublicInterfaceIPv6RangeCreateOptions
350+
defines the IPv6 range for a public interface
336351
properties:
337352
range:
338353
type: string
@@ -343,6 +358,8 @@ spec:
343358
type: object
344359
type: object
345360
vlan:
361+
description: VLANInterface defines the VLAN interface configuration
362+
for an instance
346363
properties:
347364
ipam_address:
348365
type: string
@@ -352,11 +369,17 @@ spec:
352369
- vlan_label
353370
type: object
354371
vpc:
372+
description: VPCInterfaceCreateOptions defines the VPC interface
373+
configuration for an instance
355374
properties:
356375
ipv4:
376+
description: VPCInterfaceIPv4CreateOptions defines the IPv4
377+
address and range configuration for a VPC interface
357378
properties:
358379
addresses:
359380
items:
381+
description: VPCInterfaceIPv4AddressCreateOptions
382+
defines the IPv4 configuration for a VPC interface
360383
properties:
361384
address:
362385
type: string
@@ -370,6 +393,8 @@ spec:
370393
type: array
371394
ranges:
372395
items:
396+
description: VPCInterfaceIPv4RangeCreateOptions defines
397+
the IPv4 range for a VPC interface
373398
properties:
374399
range:
375400
type: string
@@ -379,11 +404,15 @@ spec:
379404
type: array
380405
type: object
381406
ipv6:
407+
description: VPCInterfaceIPv6CreateOptions defines the IPv6
408+
configuration for a VPC interface
382409
properties:
383410
is_public:
384411
type: boolean
385412
ranges:
386413
items:
414+
description: VPCInterfaceIPv6RangeCreateOptions defines
415+
the IPv6 range for a VPC interface
387416
properties:
388417
range:
389418
type: string
@@ -393,6 +422,8 @@ spec:
393422
type: array
394423
slaac:
395424
items:
425+
description: VPCInterfaceIPv6SLAACCreateOptions defines
426+
the Range for IPv6 SLAAC
396427
properties:
397428
range:
398429
type: string

config/crd/bases/infrastructure.cluster.x-k8s.io_linodemachinetemplates.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,12 @@ spec:
295295
rule: self == oldSelf
296296
linodeInterfaces:
297297
items:
298+
description: LinodeInterfaceCreateOptions defines the linode
299+
network interface config
298300
properties:
299301
default_route:
302+
description: InterfaceDefaultRoute defines the default
303+
IPv4 and IPv6 routes for an interface
300304
properties:
301305
ipv4:
302306
type: boolean
@@ -306,11 +310,19 @@ spec:
306310
firewall_id:
307311
type: integer
308312
public:
313+
description: PublicInterfaceCreateOptions defines the
314+
IPv4 and IPv6 public interface create options
309315
properties:
310316
ipv4:
317+
description: PublicInterfaceIPv4CreateOptions defines
318+
the PublicInterfaceIPv4AddressCreateOptions for
319+
addresses
311320
properties:
312321
addresses:
313322
items:
323+
description: PublicInterfaceIPv4AddressCreateOptions
324+
defines the public IPv4 address and whether
325+
it is primary
314326
properties:
315327
address:
316328
type: string
@@ -322,9 +334,13 @@ spec:
322334
type: array
323335
type: object
324336
ipv6:
337+
description: PublicInterfaceIPv6CreateOptions defines
338+
the PublicInterfaceIPv6RangeCreateOptions
325339
properties:
326340
ranges:
327341
items:
342+
description: PublicInterfaceIPv6RangeCreateOptions
343+
defines the IPv6 range for a public interface
328344
properties:
329345
range:
330346
type: string
@@ -335,6 +351,8 @@ spec:
335351
type: object
336352
type: object
337353
vlan:
354+
description: VLANInterface defines the VLAN interface
355+
configuration for an instance
338356
properties:
339357
ipam_address:
340358
type: string
@@ -344,11 +362,19 @@ spec:
344362
- vlan_label
345363
type: object
346364
vpc:
365+
description: VPCInterfaceCreateOptions defines the VPC
366+
interface configuration for an instance
347367
properties:
348368
ipv4:
369+
description: VPCInterfaceIPv4CreateOptions defines
370+
the IPv4 address and range configuration for a
371+
VPC interface
349372
properties:
350373
addresses:
351374
items:
375+
description: VPCInterfaceIPv4AddressCreateOptions
376+
defines the IPv4 configuration for a VPC
377+
interface
352378
properties:
353379
address:
354380
type: string
@@ -362,6 +388,8 @@ spec:
362388
type: array
363389
ranges:
364390
items:
391+
description: VPCInterfaceIPv4RangeCreateOptions
392+
defines the IPv4 range for a VPC interface
365393
properties:
366394
range:
367395
type: string
@@ -371,11 +399,15 @@ spec:
371399
type: array
372400
type: object
373401
ipv6:
402+
description: VPCInterfaceIPv6CreateOptions defines
403+
the IPv6 configuration for a VPC interface
374404
properties:
375405
is_public:
376406
type: boolean
377407
ranges:
378408
items:
409+
description: VPCInterfaceIPv6RangeCreateOptions
410+
defines the IPv6 range for a VPC interface
379411
properties:
380412
range:
381413
type: string
@@ -385,6 +417,8 @@ spec:
385417
type: array
386418
slaac:
387419
items:
420+
description: VPCInterfaceIPv6SLAACCreateOptions
421+
defines the Range for IPv6 SLAAC
388422
properties:
389423
range:
390424
type: string

0 commit comments

Comments
 (0)