You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// CapacityReservationPreference specifies the preference for use of Capacity Reservations by the instance. Valid values include:
248
+
// "Open": The instance may make use of open Capacity Reservations that match its AZ and InstanceType
249
+
// "None": The instance may not make use of any Capacity Reservations. This is to conserve open reservations for desired workloads
250
+
// "CapacityReservationsOnly": The instance will only run if matched or targeted to a Capacity Reservation. Note that this is incompatible with a MarketType of `Spot`
allErrs=append(allErrs, field.Forbidden(field.NewPath("spec"), "hostID, hostResourceGroupArn, and dynamicHostAllocation are mutually exclusive"))
442
+
}
443
+
444
+
// Validate licenseConfigurationArns is required when hostResourceGroupArn is specified
445
+
ifhasHostResourceGroupArn {
446
+
iflen(r.Spec.LicenseConfigurationArns) ==0 {
447
+
allErrs=append(allErrs, field.Required(field.NewPath("spec", "licenseConfigurationArns"), "licenseConfigurationArns is required when hostResourceGroupArn is specified"))
allErrs=append(allErrs, field.Forbidden(field.NewPath("spec.template.spec"), "hostID, hostResourceGroupArn, and dynamicHostAllocation are mutually exclusive"))
198
+
}
199
+
200
+
// Validate licenseConfigurationArns is required when hostResourceGroupArn is specified
201
+
ifhasHostResourceGroupArn {
202
+
iflen(spec.LicenseConfigurationArns) ==0 {
203
+
allErrs=append(allErrs, field.Required(field.NewPath("spec", "template", "spec", "licenseConfigurationArns"), "licenseConfigurationArns is required when hostResourceGroupArn is specified"))
0 commit comments