Skip to content

Commit c414e68

Browse files
committed
HYPERFLEET-1202 - feat: add subnets field to ClusterPlatform model
Add SubnetSpec model and optional subnets array to ClusterPlatform to support subnet configuration in cluster platform spec. Required by E2E tests that validate Maestro Go template rendering of subnet data in ManifestWork ConfigMaps.
1 parent 1f869c2 commit c414e68

7 files changed

Lines changed: 125 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.27] - 2026-07-02
11+
12+
### Added
13+
14+
- `SubnetSpec` model and `subnets` optional field to `ClusterPlatform` (HYPERFLEET-1202)
15+
1016
## [1.0.24] - 2026-06-22
1117

1218
### Fixed
@@ -91,7 +97,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9197
- `hyperfleet` npm dependency for importing shared models and services from the core repository
9298

9399
<!-- Links -->
94-
[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.24...HEAD
100+
[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.27...HEAD
101+
[1.0.27]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.24...v1.0.27
95102
[1.0.24]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.23...v1.0.24
96103
[1.0.23]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.22...v1.0.23
97104
[1.0.22]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.21...v1.0.22

main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using OpenAPI;
3333
*/
3434
@service(#{ title: "HyperFleet API" })
3535
@info(#{
36-
version: "1.0.26",
36+
version: "1.0.27",
3737
contact: #{
3838
name: "HyperFleet Team",
3939
url: "https://github.com/openshift-hyperfleet",

models/cluster/example_cluster.tsp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const exampleCluster: Cluster = #{
1717
zone: "us-central1-a",
1818
network: "network-123",
1919
subnet: "subnet-123",
20+
subnets: #[
21+
#{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" },
22+
#{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" },
23+
],
2024
},
2125
},
2226
release: #{
@@ -97,6 +101,10 @@ const exampleDeletedCluster: Cluster = #{
97101
zone: "us-central1-a",
98102
network: "network-123",
99103
subnet: "subnet-123",
104+
subnets: #[
105+
#{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" },
106+
#{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" },
107+
],
100108
},
101109
},
102110
release: #{

models/cluster/example_post.tsp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ const exampleClusterCreateRequest: ClusterCreateRequest = #{
1414
zone: "us-central1-a",
1515
network: "network-123",
1616
subnet: "subnet-123",
17+
subnets: #[
18+
#{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" },
19+
#{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" },
20+
],
1721
},
1822
},
1923
release: #{

models/cluster/model.tsp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,20 @@ model ClusterPlatformSpec {
1111
template: ClusterPlatform;
1212
}
1313

14+
model SubnetSpec {
15+
id: string;
16+
name: string;
17+
cidr: string;
18+
role: string;
19+
}
20+
1421
model ClusterPlatform {
1522
projectID?: string;
1623
region?: string;
1724
zone?: string;
1825
network?: string;
1926
subnet?: string;
27+
subnets?: SubnetSpec[];
2028
}
2129

2230
model ReleaseSpec {

schemas/template/openapi.yaml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.0
22
info:
33
title: HyperFleet API
4-
version: 1.0.26
4+
version: 1.0.27
55
contact:
66
name: HyperFleet Team
77
url: https://github.com/openshift-hyperfleet
@@ -685,6 +685,15 @@ paths:
685685
zone: us-central1-a
686686
network: network-123
687687
subnet: subnet-123
688+
subnets:
689+
- id: subnet-01
690+
name: control-plane
691+
cidr: 10.0.1.0/24
692+
role: control-plane
693+
- id: subnet-02
694+
name: worker-nodes
695+
cidr: 10.0.2.0/24
696+
role: worker
688697
release:
689698
image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0
690699
version: 4.14.0
@@ -1701,6 +1710,15 @@ components:
17011710
zone: us-central1-a
17021711
network: network-123
17031712
subnet: subnet-123
1713+
subnets:
1714+
- id: subnet-01
1715+
name: control-plane
1716+
cidr: 10.0.1.0/24
1717+
role: control-plane
1718+
- id: subnet-02
1719+
name: worker-nodes
1720+
cidr: 10.0.2.0/24
1721+
role: worker
17041722
release:
17051723
image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0
17061724
version: 4.14.0
@@ -1795,6 +1813,15 @@ components:
17951813
zone: us-central1-a
17961814
network: network-123
17971815
subnet: subnet-123
1816+
subnets:
1817+
- id: subnet-01
1818+
name: control-plane
1819+
cidr: 10.0.1.0/24
1820+
role: control-plane
1821+
- id: subnet-02
1822+
name: worker-nodes
1823+
cidr: 10.0.2.0/24
1824+
role: worker
17981825
release:
17991826
image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0
18001827
version: 4.14.0
@@ -1881,6 +1908,10 @@ components:
18811908
type: string
18821909
subnet:
18831910
type: string
1911+
subnets:
1912+
type: array
1913+
items:
1914+
$ref: '#/components/schemas/SubnetSpec'
18841915
ClusterPlatformSpec:
18851916
type: object
18861917
required:
@@ -2523,6 +2554,22 @@ components:
25232554
description: |-
25242555
Aggregated status of the resource, populated by the status aggregation
25252556
pipeline from adapter condition reports.
2557+
SubnetSpec:
2558+
type: object
2559+
required:
2560+
- id
2561+
- name
2562+
- cidr
2563+
- role
2564+
properties:
2565+
id:
2566+
type: string
2567+
name:
2568+
type: string
2569+
cidr:
2570+
type: string
2571+
role:
2572+
type: string
25262573
TaintSpec:
25272574
type: object
25282575
required:

schemas/template/swagger.yaml

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ info:
1717
name: Apache 2.0
1818
url: 'https://www.apache.org/licenses/LICENSE-2.0'
1919
title: HyperFleet API
20-
version: 1.0.26
20+
version: 1.0.27
2121
host: hyperfleet.redhat.com
2222
basePath: /
2323
schemes:
@@ -621,6 +621,15 @@ paths:
621621
projectID: project-123
622622
region: us-central1
623623
subnet: subnet-123
624+
subnets:
625+
- cidr: 10.0.1.0/24
626+
id: subnet-01
627+
name: control-plane
628+
role: control-plane
629+
- cidr: 10.0.2.0/24
630+
id: subnet-02
631+
name: worker-nodes
632+
role: worker
624633
zone: us-central1-a
625634
type: template
626635
release:
@@ -1664,6 +1673,15 @@ definitions:
16641673
projectID: project-123
16651674
region: us-central1
16661675
subnet: subnet-123
1676+
subnets:
1677+
- cidr: 10.0.1.0/24
1678+
id: subnet-01
1679+
name: control-plane
1680+
role: control-plane
1681+
- cidr: 10.0.2.0/24
1682+
id: subnet-02
1683+
name: worker-nodes
1684+
role: worker
16671685
zone: us-central1-a
16681686
type: template
16691687
release:
@@ -1797,6 +1815,15 @@ definitions:
17971815
projectID: project-123
17981816
region: us-central1
17991817
subnet: subnet-123
1818+
subnets:
1819+
- cidr: 10.0.1.0/24
1820+
id: subnet-01
1821+
name: control-plane
1822+
role: control-plane
1823+
- cidr: 10.0.2.0/24
1824+
id: subnet-02
1825+
name: worker-nodes
1826+
role: worker
18001827
zone: us-central1-a
18011828
type: template
18021829
release:
@@ -1902,6 +1929,10 @@ definitions:
19021929
type: string
19031930
subnet:
19041931
type: string
1932+
subnets:
1933+
items:
1934+
$ref: '#/definitions/SubnetSpec'
1935+
type: array
19051936
zone:
19061937
type: string
19071938
type: object
@@ -2590,6 +2621,22 @@ definitions:
25902621
required:
25912622
- conditions
25922623
type: object
2624+
SubnetSpec:
2625+
properties:
2626+
cidr:
2627+
type: string
2628+
id:
2629+
type: string
2630+
name:
2631+
type: string
2632+
role:
2633+
type: string
2634+
required:
2635+
- id
2636+
- name
2637+
- cidr
2638+
- role
2639+
type: object
25932640
TaintSpec:
25942641
properties:
25952642
effect:

0 commit comments

Comments
 (0)