Skip to content

Commit c5756e7

Browse files
committed
HYPERFLEET-853 - feat: Add Reconciled to OpenAPI spec
1 parent fe59c7a commit c5756e7

14 files changed

Lines changed: 272 additions & 33 deletions

File tree

main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using OpenAPI;
2020
*
2121
*/
2222
@service(#{ title: "HyperFleet API" })
23-
@info(#{ version: "1.0.7", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
23+
@info(#{ version: "1.0.8", contact: #{ name: "HyperFleet Team" }, license: #{ name: "Apache 2.0" ,url: "https://www.apache.org/licenses/LICENSE-2.0"} })
2424
@server("https://hyperfleet.redhat.com", "Production")
2525
@route("/api/hyperfleet/v1")
2626
namespace HyperFleet;

models-core/cluster/example_cluster.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ const exampleCluster: Cluster = #{
2222
last_updated_time: "2021-01-01T10:00:00Z",
2323
last_transition_time: "2021-01-01T10:00:00Z",
2424
},
25+
#{
26+
type: ConditionType.Reconciled,
27+
status: ResourceConditionStatus.True,
28+
reason: ExampleReconciledReason,
29+
message: ExampleReconciledMessage,
30+
observed_generation: 1,
31+
created_time: "2021-01-01T10:00:00Z",
32+
last_updated_time: "2021-01-01T10:00:00Z",
33+
last_transition_time: "2021-01-01T10:00:00Z",
34+
},
2535
#{
2636
type: ConditionType.Available,
2737
status: ResourceConditionStatus.True,
@@ -80,6 +90,16 @@ const exampleDeletedCluster: Cluster = #{
8090
last_updated_time: "2021-01-01T10:00:00Z",
8191
last_transition_time: "2021-01-01T10:00:00Z",
8292
},
93+
#{
94+
type: ConditionType.Reconciled,
95+
status: ResourceConditionStatus.True,
96+
reason: ExampleReconciledReason,
97+
message: ExampleReconciledMessage,
98+
observed_generation: 1,
99+
created_time: "2021-01-01T10:00:00Z",
100+
last_updated_time: "2021-01-01T10:00:00Z",
101+
last_transition_time: "2021-01-01T10:00:00Z",
102+
},
83103
#{
84104
type: ConditionType.Available,
85105
status: ResourceConditionStatus.True,

models-core/nodepool/example_nodepool.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@ const exampleNodePool: NodePool = #{
2727
last_updated_time: "2021-01-01T10:00:00Z",
2828
last_transition_time: "2021-01-01T10:00:00Z",
2929
},
30+
#{
31+
type: ConditionType.Reconciled,
32+
status: ResourceConditionStatus.True,
33+
reason: ExampleReconciledReason,
34+
message: ExampleReconciledMessage,
35+
observed_generation: 1,
36+
created_time: "2021-01-01T10:00:00Z",
37+
last_updated_time: "2021-01-01T10:00:00Z",
38+
last_transition_time: "2021-01-01T10:00:00Z",
39+
},
3040
#{
3141
type: ConditionType.Available,
3242
status: ResourceConditionStatus.True,
@@ -90,6 +100,16 @@ const exampleDeletedNodePool: NodePool = #{
90100
last_updated_time: "2021-01-01T10:00:00Z",
91101
last_transition_time: "2021-01-01T10:00:00Z",
92102
},
103+
#{
104+
type: ConditionType.Reconciled,
105+
status: ResourceConditionStatus.True,
106+
reason: ExampleReconciledReason,
107+
message: ExampleReconciledMessage,
108+
observed_generation: 1,
109+
created_time: "2021-01-01T10:00:00Z",
110+
last_updated_time: "2021-01-01T10:00:00Z",
111+
last_transition_time: "2021-01-01T10:00:00Z",
112+
},
93113
#{
94114
type: ConditionType.Available,
95115
status: ResourceConditionStatus.True,

models-gcp/cluster/example_cluster.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ const exampleCluster: Cluster = #{
4444
last_updated_time: "2021-01-01T10:00:00Z",
4545
last_transition_time: "2021-01-01T10:00:00Z",
4646
},
47+
#{
48+
type: ConditionType.Reconciled,
49+
status: ResourceConditionStatus.True,
50+
reason: ExampleReconciledReason,
51+
message: ExampleReconciledMessage,
52+
observed_generation: 1,
53+
created_time: "2021-01-01T10:00:00Z",
54+
last_updated_time: "2021-01-01T10:00:00Z",
55+
last_transition_time: "2021-01-01T10:00:00Z",
56+
},
4757
#{
4858
type: ConditionType.Available,
4959
status: ResourceConditionStatus.True,
@@ -124,6 +134,16 @@ const exampleDeletedCluster: Cluster = #{
124134
last_updated_time: "2021-01-01T10:00:00Z",
125135
last_transition_time: "2021-01-01T10:00:00Z",
126136
},
137+
#{
138+
type: ConditionType.Reconciled,
139+
status: ResourceConditionStatus.True,
140+
reason: ExampleReconciledReason,
141+
message: ExampleReconciledMessage,
142+
observed_generation: 1,
143+
created_time: "2021-01-01T10:00:00Z",
144+
last_updated_time: "2021-01-01T10:00:00Z",
145+
last_transition_time: "2021-01-01T10:00:00Z",
146+
},
127147
#{
128148
type: ConditionType.Available,
129149
status: ResourceConditionStatus.True,

models-gcp/nodepool/example_nodepool.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ const exampleNodePool: NodePool = #{
4848
last_updated_time: "2021-01-01T10:00:00Z",
4949
last_transition_time: "2021-01-01T10:00:00Z",
5050
},
51+
#{
52+
type: ConditionType.Reconciled,
53+
status: ResourceConditionStatus.True,
54+
reason: ExampleReconciledReason,
55+
message: ExampleReconciledMessage,
56+
observed_generation: 1,
57+
created_time: "2021-01-01T10:00:00Z",
58+
last_updated_time: "2021-01-01T10:00:00Z",
59+
last_transition_time: "2021-01-01T10:00:00Z",
60+
},
5161
#{
5262
type: ConditionType.Available,
5363
status: ResourceConditionStatus.True,
@@ -133,6 +143,16 @@ const exampleDeletedNodePool: NodePool = #{
133143
last_updated_time: "2021-01-01T10:00:00Z",
134144
last_transition_time: "2021-01-01T10:00:00Z",
135145
},
146+
#{
147+
type: ConditionType.Reconciled,
148+
status: ResourceConditionStatus.True,
149+
reason: ExampleReconciledReason,
150+
message: ExampleReconciledMessage,
151+
observed_generation: 1,
152+
created_time: "2021-01-01T10:00:00Z",
153+
last_updated_time: "2021-01-01T10:00:00Z",
154+
last_transition_time: "2021-01-01T10:00:00Z",
155+
},
136156
#{
137157
type: ConditionType.Available,
138158
status: ResourceConditionStatus.True,

models/clusters/model.tsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ model ClusterStatus {
3333
* List of status conditions for the cluster.
3434
*
3535
* **Mandatory conditions**:
36-
* - `type: "Ready"`: Whether all adapters report successfully at the current generation.
36+
* - `type: "Ready"` *(deprecated — use Reconciled)*: Whether all adapters report successfully at the current generation.
37+
* - `type: "Reconciled"`: Whether the resource's desired state has been fully reconciled by all adapters at the current generation.
3738
* - `type: "Available"`: Aggregated adapter result for a common observed_generation.
3839
*
3940
* These conditions are present immediately upon resource creation.

models/common/model.tsp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ model List<T> {
176176
union ConditionType {
177177
string,
178178
Available: "Available",
179-
Ready: "Ready"
179+
Ready: "Ready",
180+
Reconciled: "Reconciled"
180181
}
181182

182183
/**
@@ -246,6 +247,8 @@ model ResourceCondition {
246247
const ExampleAvailableMessage: string = "All adapters reported Available True for the same generation";
247248
const ExampleReadyReason: string = "All adapters reported Ready True for the current generation";
248249
const ExampleReadyMessage: string = "All adapters reported Ready True for the current generation";
250+
const ExampleReconciledReason: string = "All adapters reported Reconciled True for the current generation";
251+
const ExampleReconciledMessage: string = "All adapters reported Reconciled True for the current generation";
249252
const ExampleAdapter1: string = "adapter1";
250253
const ExampleAdapter2: string = "adapter2";
251254
const ExampleAdapter1AppliedReason: string = "Validation job applied";

models/nodepools/model.tsp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ model NodePoolStatus {
3030
* List of status conditions for the nodepool.
3131
*
3232
* **Mandatory conditions**:
33-
* - `type: "Ready"`: Whether all adapters report successfully at the current generation.
33+
* - `type: "Ready"` *(deprecated — use Reconciled)*: Whether all adapters report successfully at the current generation.
34+
* - `type: "Reconciled"`: Whether the resource's desired state has been fully reconciled by all adapters at the current generation.
3435
* - `type: "Available"`: Aggregated adapter result for a common observed_generation.
3536
*
3637
* These conditions are present immediately upon resource creation.

package-lock.json

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

schemas/core/openapi.yaml

Lines changed: 38 additions & 4 deletions
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.7
4+
version: 1.0.8
55
contact:
66
name: HyperFleet Team
77
license:
@@ -50,7 +50,7 @@ paths:
5050
5151
**Note**: The `status` object in the response is read-only and computed by the service.
5252
It is NOT part of the request body. Initially,
53-
status.conditions will include mandatory "Available" and "Ready" conditions.
53+
status.conditions will include mandatory "Available", "Ready" and "Reconciled" conditions.
5454
parameters: []
5555
responses:
5656
'201':
@@ -179,6 +179,14 @@ paths:
179179
created_time: '2021-01-01T10:00:00Z'
180180
last_updated_time: '2021-01-01T10:00:00Z'
181181
last_transition_time: '2021-01-01T10:00:00Z'
182+
- type: Reconciled
183+
status: 'True'
184+
reason: All adapters reported Reconciled True for the current generation
185+
message: All adapters reported Reconciled True for the current generation
186+
observed_generation: 1
187+
created_time: '2021-01-01T10:00:00Z'
188+
last_updated_time: '2021-01-01T10:00:00Z'
189+
last_transition_time: '2021-01-01T10:00:00Z'
182190
- type: Available
183191
status: 'True'
184192
reason: All adapters reported Available True for the same generation
@@ -374,6 +382,14 @@ paths:
374382
created_time: '2021-01-01T10:00:00Z'
375383
last_updated_time: '2021-01-01T10:00:00Z'
376384
last_transition_time: '2021-01-01T10:00:00Z'
385+
- type: Reconciled
386+
status: 'True'
387+
reason: All adapters reported Reconciled True for the current generation
388+
message: All adapters reported Reconciled True for the current generation
389+
observed_generation: 1
390+
created_time: '2021-01-01T10:00:00Z'
391+
last_updated_time: '2021-01-01T10:00:00Z'
392+
last_transition_time: '2021-01-01T10:00:00Z'
377393
- type: Available
378394
status: 'True'
379395
reason: All adapters reported Available True for the same generation
@@ -1036,6 +1052,14 @@ components:
10361052
created_time: '2021-01-01T10:00:00Z'
10371053
last_updated_time: '2021-01-01T10:00:00Z'
10381054
last_transition_time: '2021-01-01T10:00:00Z'
1055+
- type: Reconciled
1056+
status: 'True'
1057+
reason: All adapters reported Reconciled True for the current generation
1058+
message: All adapters reported Reconciled True for the current generation
1059+
observed_generation: 1
1060+
created_time: '2021-01-01T10:00:00Z'
1061+
last_updated_time: '2021-01-01T10:00:00Z'
1062+
last_transition_time: '2021-01-01T10:00:00Z'
10391063
- type: Available
10401064
status: 'True'
10411065
reason: All adapters reported Available True for the same generation
@@ -1158,7 +1182,8 @@ components:
11581182
List of status conditions for the cluster.
11591183
11601184
**Mandatory conditions**:
1161-
- `type: "Ready"`: Whether all adapters report successfully at the current generation.
1185+
- `type: "Ready"` *(deprecated — use Reconciled)*: Whether all adapters report successfully at the current generation.
1186+
- `type: "Reconciled"`: Whether the resource's desired state has been fully reconciled by all adapters at the current generation.
11621187
- `type: "Available"`: Aggregated adapter result for a common observed_generation.
11631188
11641189
These conditions are present immediately upon resource creation.
@@ -1326,6 +1351,14 @@ components:
13261351
created_time: '2021-01-01T10:00:00Z'
13271352
last_updated_time: '2021-01-01T10:00:00Z'
13281353
last_transition_time: '2021-01-01T10:00:00Z'
1354+
- type: Reconciled
1355+
status: 'True'
1356+
reason: All adapters reported Reconciled True for the current generation
1357+
message: All adapters reported Reconciled True for the current generation
1358+
observed_generation: 1
1359+
created_time: '2021-01-01T10:00:00Z'
1360+
last_updated_time: '2021-01-01T10:00:00Z'
1361+
last_transition_time: '2021-01-01T10:00:00Z'
13291362
- type: Available
13301363
status: 'True'
13311364
reason: All adapters reported Available True for the same generation
@@ -1515,7 +1548,8 @@ components:
15151548
List of status conditions for the nodepool.
15161549
15171550
**Mandatory conditions**:
1518-
- `type: "Ready"`: Whether all adapters report successfully at the current generation.
1551+
- `type: "Ready"` *(deprecated — use Reconciled)*: Whether all adapters report successfully at the current generation.
1552+
- `type: "Reconciled"`: Whether the resource's desired state has been fully reconciled by all adapters at the current generation.
15191553
- `type: "Available"`: Aggregated adapter result for a common observed_generation.
15201554
15211555
These conditions are present immediately upon resource creation.

0 commit comments

Comments
 (0)