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
Copy file name to clipboardExpand all lines: machine/v1beta1/types_awsprovider.go
+43-1Lines changed: 43 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -430,6 +430,7 @@ const (
430
430
431
431
// HostPlacement is the type that will be used to configure the placement of AWS instances.
432
432
// +kubebuilder:validation:XValidation:rule="has(self.affinity) && self.affinity == 'DedicatedHost' ? has(self.dedicatedHost) : true",message="dedicatedHost is required when affinity is DedicatedHost, and optional otherwise"
433
+
// +kubebuilder:validation:XValidation:rule="has(self.affinity) && has(self.dynamicHost) ? self.affinity == 'DynamicHost' : true",message="dynamicHost is only allowed when affinity is DynamicHost, and forbidden otherwise"
433
434
// +union
434
435
typeHostPlacementstruct {
435
436
// affinity specifies the affinity setting for the instance.
// DedicatedHost represents the configuration for the usage of dedicated host.
477
+
// +kubebuilder:validation:XValidation:rule="self.allocationStrategy == 'Provided' ? has(self.id) : true",message="id is required when allocationStrategy is Provided, and forbidden otherwise"
478
+
// +kubebuilder:validation:XValidation:rule="has(self.id) ? self.allocationStrategy == 'Provided' : true",message="id is only allowed when allocationStrategy is Provided"
479
+
// +kubebuilder:validation:XValidation:rule="has(self.dynamicHostAllocation) ? self.allocationStrategy == 'Dynamic' : true",message="dynamicHostAllocation is only allowed when allocationStrategy is Dynamic"
464
480
typeDedicatedHoststruct {
481
+
// allocationStrategy specifies if the dedicated host will be provided by the admin through the id field or if the host will be dynamically allocated.
482
+
// Valid values are Provided and Dynamic.
483
+
// The current default value is "Provided".
484
+
// When AllocationStrategy is set to Provided, an ID of the dedicated host to assign must be provided.
485
+
// When AllocationStrategy is set to Dynamic, a dedicated host will be allocated and used to assign instances.
486
+
// When AllocationStrategy is set to Dynamic, and DynamicHostAllocation is provided, a dedicated host will be allocated and the tags in DynamicHostAllocation will be assigned to that host.
// id identifies the AWS Dedicated Host on which the instance must run.
466
493
// The value must start with "h-" followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f).
467
494
// The use of 8 lowercase hexadecimal characters is for older legacy hosts that may not have been migrated to newer format.
468
495
// Must be either 10 or 19 characters in length.
469
496
// +kubebuilder:validation:XValidation:rule="self.matches('^h-([0-9a-f]{8}|[0-9a-f]{17})$')",message="hostID must start with 'h-' followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f)"
470
497
// +kubebuilder:validation:MinLength=10
471
498
// +kubebuilder:validation:MaxLength=19
472
-
// +required
499
+
// +optional
500
+
// +unionMember
473
501
IDstring`json:"id,omitempty"`
502
+
503
+
// dynamicHostAllocation specifies tags to apply to a dynamically allocated dedicated host.
504
+
// This field is mutually exclusive with id and always allocates exactly one host.
0 commit comments