Skip to content

Commit 2c1f842

Browse files
committed
Add compute host aggregates support
Much of this is auto-generated, with the important bits manually updated. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Generated-by: ./cmd/scaffold-controller
1 parent 9f67800 commit 2c1f842

46 files changed

Lines changed: 3069 additions & 12 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PROJECT

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ resources:
2424
kind: FloatingIP
2525
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
2626
version: v1alpha1
27+
- api:
28+
crdVersion: v1
29+
namespaced: true
30+
domain: k-orc.cloud
31+
group: openstack
32+
kind: HostAggregate
33+
path: github.com/k-orc/openstack-resource-controller/api/v1alpha1
34+
version: v1alpha1
2735
- api:
2836
crdVersion: v1
2937
namespaced: true

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ kubectl delete -f $ORC_RELEASE
6969
|:---------------------------:|:-------:|:-------:|:--------:|
7070
| flavor | |||
7171
| floating ip | |||
72+
| host aggregate | |||
7273
| image ||||
7374
| network | |||
7475
| port | |||
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
Copyright 2025 The ORC Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1alpha1
18+
19+
// HostAggregateResourceSpec contains the desired state of the resource.
20+
type HostAggregateResourceSpec struct {
21+
// TODO(stephenfin): Enforce that the name should not contain a colon.
22+
23+
// name will be the name of the created resource. If not specified, the
24+
// name of the ORC object will be used.
25+
// +optional
26+
Name *OpenStackName `json:"name"`
27+
28+
// availabilityZone is the availability zone of the host aggregate.
29+
// +kubebuilder:validation:MinLength:=1
30+
// +kubebuilder:validation:MaxLength:=255
31+
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="availabilityZone is immutable"
32+
// +optional
33+
AvailabilityZone *string `json:"availabilityZone,omitempty"`
34+
}
35+
36+
// HostAggregateFilter defines an existing resource by its properties
37+
// +kubebuilder:validation:MinProperties:=1
38+
type HostAggregateFilter struct {
39+
// name of the existing resource
40+
// +optional
41+
Name *OpenStackName `json:"name,omitempty"`
42+
}
43+
44+
// HostAggregateResourceStatus represents the observed state of the resource.
45+
type HostAggregateResourceStatus struct {
46+
// availabilityZone is the availability zone of the host aggregate.
47+
// +kubebuilder:validation:MinLength:=1
48+
// +kubebuilder:validation:MaxLength:=255
49+
// +optional
50+
AvailabilityZone string `json:"availabilityZone"`
51+
52+
// name is a Human-readable name for the resource. Might not be unique.
53+
// +kubebuilder:validation:MaxLength=1024
54+
// +optional
55+
Name string `json:"name"`
56+
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 207 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)