File tree Expand file tree Collapse file tree 9 files changed +90
-0
lines changed Expand file tree Collapse file tree 9 files changed +90
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ func (src *AWSCluster) ConvertTo(dstRaw conversion.Hub) error {
63
63
dst .Status .Bastion .NetworkInterfaceType = restored .Status .Bastion .NetworkInterfaceType
64
64
dst .Status .Bastion .CapacityReservationID = restored .Status .Bastion .CapacityReservationID
65
65
dst .Status .Bastion .MarketType = restored .Status .Bastion .MarketType
66
+ dst .Status .Bastion .CapacityReservationPreference = restored .Status .Bastion .CapacityReservationPreference
66
67
}
67
68
dst .Spec .Partition = restored .Spec .Partition
68
69
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ func (src *AWSMachine) ConvertTo(dstRaw conversion.Hub) error {
44
44
dst .Spec .SecurityGroupOverrides = restored .Spec .SecurityGroupOverrides
45
45
dst .Spec .CapacityReservationID = restored .Spec .CapacityReservationID
46
46
dst .Spec .MarketType = restored .Spec .MarketType
47
+ dst .Spec .CapacityReservationPreference = restored .Spec .CapacityReservationPreference
47
48
dst .Spec .NetworkInterfaceType = restored .Spec .NetworkInterfaceType
48
49
if restored .Spec .ElasticIPPool != nil {
49
50
if dst .Spec .ElasticIPPool == nil {
@@ -108,6 +109,7 @@ func (r *AWSMachineTemplate) ConvertTo(dstRaw conversion.Hub) error {
108
109
dst .Spec .Template .Spec .SecurityGroupOverrides = restored .Spec .Template .Spec .SecurityGroupOverrides
109
110
dst .Spec .Template .Spec .CapacityReservationID = restored .Spec .Template .Spec .CapacityReservationID
110
111
dst .Spec .Template .Spec .MarketType = restored .Spec .Template .Spec .MarketType
112
+ dst .Spec .Template .Spec .CapacityReservationPreference = restored .Spec .Template .Spec .CapacityReservationPreference
111
113
dst .Spec .Template .Spec .NetworkInterfaceType = restored .Spec .Template .Spec .NetworkInterfaceType
112
114
if restored .Spec .Template .Spec .ElasticIPPool != nil {
113
115
if dst .Spec .Template .Spec .ElasticIPPool == nil {
Original file line number Diff line number Diff line change @@ -233,6 +233,13 @@ type AWSMachineSpec struct {
233
233
// If marketType is not specified and spotMarketOptions is provided, the marketType defaults to "Spot".
234
234
// +optional
235
235
MarketType MarketType `json:"marketType,omitempty"`
236
+
237
+ // CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
238
+ // "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
239
+ // "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
240
+ // "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
241
+ // +optional
242
+ CapacityReservationPreference CapacityReservationPreference `json:"capacityReservationPreference,omitempty"`
236
243
}
237
244
238
245
// CloudInit defines options related to the bootstrapping systems where
Original file line number Diff line number Diff line change @@ -273,8 +273,31 @@ type Instance struct {
273
273
// If marketType is not specified and spotMarketOptions is provided, the marketType defaults to "Spot".
274
274
// +optional
275
275
MarketType MarketType `json:"marketType,omitempty"`
276
+
277
+ // CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
278
+ // "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
279
+ // "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
280
+ // "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
281
+ // +optional
282
+ CapacityReservationPreference CapacityReservationPreference `json:"capacityReservationPreference,omitempty"`
276
283
}
277
284
285
+ // CapacityReservationPreference describes the preferred use of capacity reservations
286
+ // of an instance
287
+ // +kubebuilder:validation:Enum:=None;CapacityReservationsOnly;Open
288
+ type CapacityReservationPreference string
289
+
290
+ const (
291
+ // CapacityReservationPreferenceNone is a CapacityReservationPreference enum value
292
+ CapacityReservationPreferenceNone CapacityReservationPreference = "None"
293
+
294
+ // CapacityReservationPreferenceOnly is a CapacityReservationPreference enum value
295
+ CapacityReservationPreferenceOnly CapacityReservationPreference = "CapacityReservationsOnly"
296
+
297
+ // CapacityReservationPreferenceOpen is a CapacityReservationPreference enum value
298
+ CapacityReservationPreferenceOpen CapacityReservationPreference = "Open"
299
+ )
300
+
278
301
// MarketType describes the market type of an Instance
279
302
// +kubebuilder:validation:Enum:=OnDemand;Spot;CapacityBlock
280
303
type MarketType string
Original file line number Diff line number Diff line change @@ -1214,6 +1214,17 @@ spec:
1214
1214
description : CapacityReservationID specifies the target Capacity
1215
1215
Reservation into which the instance should be launched.
1216
1216
type : string
1217
+ capacityReservationPreference :
1218
+ description : |-
1219
+ CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
1220
+ "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
1221
+ "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
1222
+ "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
1223
+ enum :
1224
+ - None
1225
+ - CapacityReservationsOnly
1226
+ - Open
1227
+ type : string
1217
1228
ebsOptimized :
1218
1229
description : Indicates whether the instance is optimized for Amazon
1219
1230
EBS I/O.
@@ -3395,6 +3406,17 @@ spec:
3395
3406
description : CapacityReservationID specifies the target Capacity
3396
3407
Reservation into which the instance should be launched.
3397
3408
type : string
3409
+ capacityReservationPreference :
3410
+ description : |-
3411
+ CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
3412
+ "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
3413
+ "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
3414
+ "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
3415
+ enum :
3416
+ - None
3417
+ - CapacityReservationsOnly
3418
+ - Open
3419
+ type : string
3398
3420
ebsOptimized :
3399
3421
description : Indicates whether the instance is optimized for Amazon
3400
3422
EBS I/O.
Original file line number Diff line number Diff line change @@ -2197,6 +2197,17 @@ spec:
2197
2197
description : CapacityReservationID specifies the target Capacity
2198
2198
Reservation into which the instance should be launched.
2199
2199
type : string
2200
+ capacityReservationPreference :
2201
+ description : |-
2202
+ CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
2203
+ "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
2204
+ "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
2205
+ "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
2206
+ enum :
2207
+ - None
2208
+ - CapacityReservationsOnly
2209
+ - Open
2210
+ type : string
2200
2211
ebsOptimized :
2201
2212
description : Indicates whether the instance is optimized for Amazon
2202
2213
EBS I/O.
Original file line number Diff line number Diff line change @@ -641,6 +641,17 @@ spec:
641
641
description : CapacityReservationID specifies the target Capacity Reservation
642
642
into which the instance should be launched.
643
643
type : string
644
+ capacityReservationPreference :
645
+ description : |-
646
+ CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
647
+ "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
648
+ "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
649
+ "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
650
+ enum :
651
+ - None
652
+ - CapacityReservationsOnly
653
+ - Open
654
+ type : string
644
655
cloudInit :
645
656
description : |-
646
657
CloudInit defines options related to the bootstrapping systems where
Original file line number Diff line number Diff line change @@ -560,6 +560,17 @@ spec:
560
560
description : CapacityReservationID specifies the target Capacity
561
561
Reservation into which the instance should be launched.
562
562
type : string
563
+ capacityReservationPreference :
564
+ description : |-
565
+ CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
566
+ "Open" (default): The instance may make make use of open Capacity Reservations that match its AZ and InstanceType
567
+ "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
568
+ "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation
569
+ enum :
570
+ - None
571
+ - CapacityReservationsOnly
572
+ - Open
573
+ type : string
563
574
cloudInit :
564
575
description : |-
565
576
CloudInit defines options related to the bootstrapping systems where
You can’t perform that action at this time.
0 commit comments