Skip to content
Open
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
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
enable_workaround_docker_io: 'false'
branch: ${{ matrix.openstack_version }}
enabled_services: "openstack-cli-server"
conf_overrides: |
[[post-config|/etc/nova/nova.conf]]
[filter_scheduler]
enabled_filters = ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter,SimpleCIDRAffinityFilter,JsonFilter

- name: Deploy a Kind Cluster
uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab
Expand Down
64 changes: 57 additions & 7 deletions api/v1alpha1/server_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ type ServerResourceSpec struct {
// +optional
Volumes []ServerVolumeSpec `json:"volumes,omitempty"`

// serverGroupRef is a reference to a ServerGroup object. The server
// will be created in the server group.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serverGroupRef is immutable"
ServerGroupRef *KubernetesNameRef `json:"serverGroupRef,omitempty"`

// availabilityZone is the availability zone in which to create the server.
// +kubebuilder:validation:MaxLength=255
// +optional
Expand Down Expand Up @@ -194,6 +188,11 @@ type ServerResourceSpec struct {
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="configDrive is immutable"
ConfigDrive *bool `json:"configDrive,omitempty"`

// schedulerHints provides hints to the Nova scheduler for server placement.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="schedulerHints is immutable"
SchedulerHints *ServerSchedulerHints `json:"schedulerHints,omitempty"`
}

// ServerMetadata represents a key-value pair for server metadata.
Expand All @@ -211,8 +210,59 @@ type ServerMetadata struct {
Value string `json:"value,omitempty"`
}

// +kubebuilder:validation:MinProperties:=1
// ServerSchedulerHints provides hints to the Nova scheduler for server placement.
type ServerSchedulerHints struct {
// serverGroupRef is a reference to a ServerGroup object. The server will be
// scheduled on a host in the specified server group.
// +optional
ServerGroupRef *KubernetesNameRef `json:"serverGroupRef,omitempty"`

// differentHostServerRefs is a list of references to Server objects.
// The server will be scheduled on a different host than all specified servers.
// +listType=set
// +kubebuilder:validation:MaxItems:=64
// +optional
DifferentHostServerRefs []KubernetesNameRef `json:"differentHostServerRefs,omitempty"`

// sameHostServerRefs is a list of references to Server objects.
// The server will be scheduled on the same host as all specified servers.
// +listType=set
// +kubebuilder:validation:MaxItems:=64
// +optional
SameHostServerRefs []KubernetesNameRef `json:"sameHostServerRefs,omitempty"`

// query is a conditional statement that results in compute nodes
// able to host the server.
// +kubebuilder:validation:MaxLength:=1024
// +optional
Query string `json:"query,omitempty"`

// targetCell is a cell name where the server will be placed.
// +kubebuilder:validation:MaxLength:=255
// +optional
TargetCell string `json:"targetCell,omitempty"`

// differentCell is a list of cell names where the server should not
// be placed.
// +listType=set
// +kubebuilder:validation:MaxItems:=64
// +kubebuilder:validation:items:MaxLength=1024
// +optional
DifferentCell []string `json:"differentCell,omitempty"`

// buildNearHostIP specifies a subnet of compute nodes to host the server.
// The host IP should be provided in an CIDR format like 10.10.10.10/24.
// +optional
BuildNearHostIP *CIDR `json:"buildNearHostIP,omitempty"`

// additionalProperties is a map of arbitrary key/value pairs that are
// not validated by Nova.
// +optional
AdditionalProperties map[string]string `json:"additionalProperties,omitempty"`
}

// +kubebuilder:validation:MaxProperties:=1
// +kubebuilder:validation:MinProperties:=1
type UserDataSpec struct {
// secretRef is a reference to a Secret containing the user data for this server.
// +optional
Expand Down
57 changes: 52 additions & 5 deletions api/v1alpha1/zz_generated.deepcopy.go

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

133 changes: 125 additions & 8 deletions cmd/models-schema/zz_generated.openapi.go

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

Loading
Loading