Skip to content

SPLAT-2169: WIP: implement fields for DedicatedHostTenancy to align with upstream #2292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion machine/v1beta1/types_awsprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,32 @@ type Placement struct {
// +optional
AvailabilityZone string `json:"availabilityZone,omitempty"`
// tenancy indicates if instance should run on shared or single-tenant hardware. There are
// supported 3 options: default, dedicated and host.
// supported 3 options: default, dedicated, and host.
// +optional
Tenancy InstanceTenancy `json:"tenancy,omitempty"`

// dedicatedHostTenancy when tenancy is set to 'host', this defines the host ID and host affinty to apply
// to associated machines.
// +openshift:enable:FeatureGate=AWSDedicatedHosts
// +optional
DedicatedHostTenancy *DedicatedHostTenancy `json:"dedicatedHostTenancy,omitempty"`
}

// DedicatedHostTenancy describes the host tenancy configuration. This is used in scenarios where
// hosts are to be deployed to specific dedicated hosts.
type DedicatedHostTenancy struct {
// HostID specifies the Dedicated Host on which the instance should be launched.
// +optional
HostID *string `json:"hostId,omitempty"`

// Affinity specifies the dedicated host affinity setting for the instance.
// When affinity is set to Host, an instance launched onto a specific host always restarts on the same host if stopped.
// +optional
// +kubebuilder:validation:Enum:=Defailt;Host
HostAffinity *string `json:"hostAffinity,omitempty"`
}


// Filter is a filter used to identify an AWS resource
type Filter struct {
// name of the filter. Filter names are case-sensitive.
Expand Down
33 changes: 32 additions & 1 deletion machine/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions machine/v1beta1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -21640,6 +21640,20 @@
}
}
},
"com.github.openshift.api.machine.v1beta1.DedicatedHostTenancy": {
"description": "DedicatedHostTenancy describes the host tenancy configuration. This is used in scenarios where hosts are to be deployed to specific dedicated hosts.",
"type": "object",
"properties": {
"hostAffinity": {
"description": "Affinity specifies the dedicated host affinity setting for the instance. When affinity is set to Host, an instance launched onto a specific host always restarts on the same host if stopped.",
"type": "string"
},
"hostId": {
"description": "HostID specifies the Dedicated Host on which the instance should be launched.",
"type": "string"
}
}
},
"com.github.openshift.api.machine.v1beta1.DiskEncryptionSetParameters": {
"description": "DiskEncryptionSetParameters is the disk encryption set properties",
"type": "object",
Expand Down Expand Up @@ -22884,12 +22898,16 @@
"description": "availabilityZone is the availability zone of the instance",
"type": "string"
},
"dedicatedHostTenancy": {
"description": "dedicatedHostTenancy when tenancy is set to 'host', this defines the host ID and host affinty to apply to associated machines.",
"$ref": "#/definitions/com.github.openshift.api.machine.v1beta1.DedicatedHostTenancy"
},
"region": {
"description": "region is the region to use to create the instance",
"type": "string"
},
"tenancy": {
"description": "tenancy indicates if instance should run on shared or single-tenant hardware. There are supported 3 options: default, dedicated and host.",
"description": "tenancy indicates if instance should run on shared or single-tenant hardware. There are supported 3 options: default, dedicated, and host.",
"type": "string"
}
}
Expand Down