diff --git a/CHANGELOG.md b/CHANGELOG.md index a734da9..2c344e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.0.27] - 2026-07-02 + +### Added + +- `SubnetSpec` model and `subnets` optional field to `ClusterPlatform` (HYPERFLEET-1202) + ## [1.0.24] - 2026-06-22 ### Fixed @@ -91,7 +97,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `hyperfleet` npm dependency for importing shared models and services from the core repository -[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.24...HEAD +[Unreleased]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.27...HEAD +[1.0.27]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.24...v1.0.27 [1.0.24]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.23...v1.0.24 [1.0.23]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.22...v1.0.23 [1.0.22]: https://github.com/openshift-hyperfleet/hyperfleet-api-spec-template/compare/v1.0.21...v1.0.22 diff --git a/main.tsp b/main.tsp index 151ab70..b27feae 100644 --- a/main.tsp +++ b/main.tsp @@ -33,7 +33,7 @@ using OpenAPI; */ @service(#{ title: "HyperFleet API" }) @info(#{ - version: "1.0.26", + version: "1.0.27", contact: #{ name: "HyperFleet Team", url: "https://github.com/openshift-hyperfleet", diff --git a/models/cluster/example_cluster.tsp b/models/cluster/example_cluster.tsp index 88d9f16..3275160 100644 --- a/models/cluster/example_cluster.tsp +++ b/models/cluster/example_cluster.tsp @@ -17,6 +17,10 @@ const exampleCluster: Cluster = #{ zone: "us-central1-a", network: "network-123", subnet: "subnet-123", + subnets: #[ + #{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" }, + #{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" }, + ], }, }, release: #{ @@ -97,6 +101,10 @@ const exampleDeletedCluster: Cluster = #{ zone: "us-central1-a", network: "network-123", subnet: "subnet-123", + subnets: #[ + #{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" }, + #{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" }, + ], }, }, release: #{ diff --git a/models/cluster/example_post.tsp b/models/cluster/example_post.tsp index b45f407..2c37ab6 100644 --- a/models/cluster/example_post.tsp +++ b/models/cluster/example_post.tsp @@ -14,6 +14,10 @@ const exampleClusterCreateRequest: ClusterCreateRequest = #{ zone: "us-central1-a", network: "network-123", subnet: "subnet-123", + subnets: #[ + #{ id: "subnet-01", name: "control-plane", cidr: "10.0.1.0/24", role: "control-plane" }, + #{ id: "subnet-02", name: "worker-nodes", cidr: "10.0.2.0/24", role: "worker" }, + ], }, }, release: #{ diff --git a/models/cluster/model.tsp b/models/cluster/model.tsp index 3c2d038..5810c62 100644 --- a/models/cluster/model.tsp +++ b/models/cluster/model.tsp @@ -11,12 +11,20 @@ model ClusterPlatformSpec { template: ClusterPlatform; } +model SubnetSpec { + id: string; + name: string; + cidr: string; + role: string; +} + model ClusterPlatform { projectID?: string; region?: string; zone?: string; network?: string; subnet?: string; + subnets?: SubnetSpec[]; } model ReleaseSpec { diff --git a/schemas/template/openapi.yaml b/schemas/template/openapi.yaml index 46cb155..6efe015 100644 --- a/schemas/template/openapi.yaml +++ b/schemas/template/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: HyperFleet API - version: 1.0.26 + version: 1.0.27 contact: name: HyperFleet Team url: https://github.com/openshift-hyperfleet @@ -685,6 +685,15 @@ paths: zone: us-central1-a network: network-123 subnet: subnet-123 + subnets: + - id: subnet-01 + name: control-plane + cidr: 10.0.1.0/24 + role: control-plane + - id: subnet-02 + name: worker-nodes + cidr: 10.0.2.0/24 + role: worker release: image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0 version: 4.14.0 @@ -1701,6 +1710,15 @@ components: zone: us-central1-a network: network-123 subnet: subnet-123 + subnets: + - id: subnet-01 + name: control-plane + cidr: 10.0.1.0/24 + role: control-plane + - id: subnet-02 + name: worker-nodes + cidr: 10.0.2.0/24 + role: worker release: image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0 version: 4.14.0 @@ -1795,6 +1813,15 @@ components: zone: us-central1-a network: network-123 subnet: subnet-123 + subnets: + - id: subnet-01 + name: control-plane + cidr: 10.0.1.0/24 + role: control-plane + - id: subnet-02 + name: worker-nodes + cidr: 10.0.2.0/24 + role: worker release: image: registry.redhat.io/openshift4/ose-cluster-version-operator:v4.14.0 version: 4.14.0 @@ -1881,6 +1908,10 @@ components: type: string subnet: type: string + subnets: + type: array + items: + $ref: '#/components/schemas/SubnetSpec' ClusterPlatformSpec: type: object required: @@ -2523,6 +2554,22 @@ components: description: |- Aggregated status of the resource, populated by the status aggregation pipeline from adapter condition reports. + SubnetSpec: + type: object + required: + - id + - name + - cidr + - role + properties: + id: + type: string + name: + type: string + cidr: + type: string + role: + type: string TaintSpec: type: object required: diff --git a/schemas/template/swagger.yaml b/schemas/template/swagger.yaml index 3feebdf..d2e6e81 100644 --- a/schemas/template/swagger.yaml +++ b/schemas/template/swagger.yaml @@ -17,7 +17,7 @@ info: name: Apache 2.0 url: 'https://www.apache.org/licenses/LICENSE-2.0' title: HyperFleet API - version: 1.0.26 + version: 1.0.27 host: hyperfleet.redhat.com basePath: / schemes: @@ -621,6 +621,15 @@ paths: projectID: project-123 region: us-central1 subnet: subnet-123 + subnets: + - cidr: 10.0.1.0/24 + id: subnet-01 + name: control-plane + role: control-plane + - cidr: 10.0.2.0/24 + id: subnet-02 + name: worker-nodes + role: worker zone: us-central1-a type: template release: @@ -1664,6 +1673,15 @@ definitions: projectID: project-123 region: us-central1 subnet: subnet-123 + subnets: + - cidr: 10.0.1.0/24 + id: subnet-01 + name: control-plane + role: control-plane + - cidr: 10.0.2.0/24 + id: subnet-02 + name: worker-nodes + role: worker zone: us-central1-a type: template release: @@ -1797,6 +1815,15 @@ definitions: projectID: project-123 region: us-central1 subnet: subnet-123 + subnets: + - cidr: 10.0.1.0/24 + id: subnet-01 + name: control-plane + role: control-plane + - cidr: 10.0.2.0/24 + id: subnet-02 + name: worker-nodes + role: worker zone: us-central1-a type: template release: @@ -1902,6 +1929,10 @@ definitions: type: string subnet: type: string + subnets: + items: + $ref: '#/definitions/SubnetSpec' + type: array zone: type: string type: object @@ -2590,6 +2621,22 @@ definitions: required: - conditions type: object + SubnetSpec: + properties: + cidr: + type: string + id: + type: string + name: + type: string + role: + type: string + required: + - id + - name + - cidr + - role + type: object TaintSpec: properties: effect: