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
// AWSConfidentialComputePolicy represents the confidential compute configuration for the instance.
@@ -294,6 +295,7 @@ type AWSResourceReference struct {
294
295
}
295
296
296
297
// Placement indicates where to create the instance in AWS
298
+
// +kubebuilder:validation:XValidation:rule="has(self.tenancy) && self.tenancy == 'host' ? true : !has(self.host)",message="host may only be specified when tenancy is host"
297
299
typePlacementstruct {
298
300
// region is the region to use to create the instance
// Filter is a filter used to identify an AWS resource
@@ -416,19 +429,20 @@ const (
416
429
)
417
430
418
431
// HostPlacement is the type that will be used to configure the placement of AWS instances.
419
-
// +kubebuilder:validation:XValidation:rule="has(self.type) && self.affinity == 'DedicatedHost' ? has(self.dedicatedHost) : !has(self.dedicatedHost)",message="dedicatedHost is required when affinity is DedicatedHost, and forbidden otherwise"
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"
420
433
// +union
421
434
typeHostPlacementstruct {
422
435
// affinity specifies the affinity setting for the instance.
423
436
// Allowed values are AnyAvailable and DedicatedHost.
424
437
// When Affinity is set to DedicatedHost, an instance started onto a specific host always restarts on the same host if stopped. In this scenario, the `dedicatedHost` field must be set.
425
438
// When Affinity is set to AnyAvailable, and you stop and restart the instance, it can be restarted on any available host.
439
+
// When Affinity is set to AnyAvailable and the `dedicatedHost` field is defined, it runs on specified Dedicated Host, but may move if stopped.
426
440
// +required
427
441
// +unionDiscriminator
428
442
Affinity*HostAffinity`json:"affinity,omitempty"`
429
443
430
444
// dedicatedHost specifies the exact host that an instance should be restarted on if stopped.
431
-
// dedicatedHost is required when 'affinity' is set to DedicatedHost, and forbidden otherwise.
445
+
// dedicatedHost is required when 'affinity' is set to DedicatedHost, and optional otherwise.
0 commit comments