Skip to content

Commit 5664e98

Browse files
committed
specs
1 parent a912ee6 commit 5664e98

File tree

3 files changed

+305
-297
lines changed

3 files changed

+305
-297
lines changed

specs/fluxcd_app.yaml

Lines changed: 109 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ paths:
3333
application/json:
3434
schema:
3535
$ref: '#/components/schemas/Error'
36-
3736
'403':
3837
description: Forbidden
3938
content:
@@ -48,48 +47,47 @@ paths:
4847
$ref: '#/components/schemas/Error'
4948

5049
/orchestrator/flux-application/app:
51-
get:
52-
summary: Get application details
53-
description: Retrieve details of a specific Flux application.
54-
parameters:
55-
- name: appId
56-
in: query
57-
required: true
58-
schema:
59-
type: string
60-
description: The application identifier in the format "1|default|myksApp|Kustomization as the first field having the cluster id, then second field having the namespace of the app , third field denoted the app name and last contains a boolean value of true and false".
61-
- name: token
62-
in: header
63-
required: true
64-
schema:
65-
type: string
66-
description: The authentication token.
67-
responses:
68-
'200':
69-
description: Successful response
70-
content:
71-
application/json:
72-
schema:
73-
$ref: '#/components/schemas/FluxApplicationDetailDto'
74-
'400':
75-
description: Bad request
76-
content:
77-
application/json:
78-
schema:
79-
$ref: '#/components/schemas/Error'
80-
'403':
81-
description: Forbidden
82-
content:
83-
application/json:
84-
schema:
85-
$ref: '#/components/schemas/Error'
86-
'500':
87-
description: Internal server error
88-
content:
89-
application/json:
90-
schema:
91-
$ref: '#/components/schemas/Error'
92-
50+
get:
51+
summary: Get application details
52+
description: Retrieve details of a specific Flux application.
53+
parameters:
54+
- name: appId
55+
in: query
56+
required: true
57+
schema:
58+
type: string
59+
description: The application identifier in the format "clusterId|namespace|appName|isKustomizeApp" where isKustomizeApp is a boolean value indicating if the app is a Kustomization type.
60+
- name: token
61+
in: header
62+
required: true
63+
schema:
64+
type: string
65+
description: The authentication token.
66+
responses:
67+
'200':
68+
description: Successful response
69+
content:
70+
application/json:
71+
schema:
72+
$ref: '#/components/schemas/FluxApplicationDetailDto'
73+
'400':
74+
description: Bad request
75+
content:
76+
application/json:
77+
schema:
78+
$ref: '#/components/schemas/Error'
79+
'403':
80+
description: Forbidden
81+
content:
82+
application/json:
83+
schema:
84+
$ref: '#/components/schemas/Error'
85+
'500':
86+
description: Internal server error
87+
content:
88+
application/json:
89+
schema:
90+
$ref: '#/components/schemas/Error'
9391

9492
components:
9593
schemas:
@@ -107,6 +105,13 @@ components:
107105
description: List of Flux applications
108106
items:
109107
$ref: '#/components/schemas/FluxAppDto'
108+
errored:
109+
type: boolean
110+
description: Whether there was an error fetching the applications
111+
errorMsg:
112+
type: string
113+
description: Error message if any
114+
110115
FluxAppDto:
111116
type: object
112117
properties:
@@ -116,9 +121,8 @@ components:
116121
example: flux-system
117122
appStatus:
118123
type: boolean
119-
enum: [True, False]
120-
description:
121-
example: True
124+
description: Health status of the application
125+
example: true
122126
syncStatus:
123127
type: string
124128
description: Sync status of the application
@@ -137,9 +141,21 @@ components:
137141
example: flux-system
138142
fluxAppDeploymentType:
139143
type: string
140-
enum": ["Kustomization", "HelmRelease"]
144+
enum: ["Kustomization", "HelmRelease"]
141145
description: Indicates if the application is a Kustomize type or standalone flux made HelmRelease app
142-
example: true
146+
example: "Kustomization"
147+
148+
FluxApplicationDetailDto:
149+
type: object
150+
allOf:
151+
- $ref: '#/components/schemas/FluxAppDto'
152+
- type: object
153+
properties:
154+
fluxAppStatusDetail:
155+
$ref: '#/components/schemas/FluxAppStatusDetail'
156+
resourceTree:
157+
$ref: '#/components/schemas/ResourceTreeResponse'
158+
143159
FluxAppStatusDetail:
144160
type: object
145161
properties:
@@ -153,29 +169,46 @@ components:
153169
type: string
154170
description: Short key words like 'ReconciliationFailed', 'Reconciled', and so on for the user to understand the reason of the given of the status
155171

156-
InfoItem:
172+
ResourceTreeResponse:
157173
type: object
158174
properties:
159-
name:
160-
type: string
161-
value:
175+
nodes:
176+
type: array
177+
items:
178+
$ref: '#/components/schemas/ResourceNode'
179+
pods:
180+
type: array
181+
items:
182+
$ref: '#/components/schemas/PodMetadata'
183+
status:
162184
type: string
185+
description: Status of the resource tree
163186

164-
HealthStatus:
187+
ResourceNode:
165188
type: object
166189
properties:
167-
status:
190+
group:
168191
type: string
169-
message:
192+
version:
170193
type: string
171-
172-
ResourceNetworkingInfo:
173-
type: object
174-
properties:
175-
labels:
176-
type: object
177-
additionalProperties:
178-
type: string
194+
kind:
195+
type: string
196+
namespace:
197+
type: string
198+
name:
199+
type: string
200+
uid:
201+
type: string
202+
parentRefs:
203+
type: array
204+
items:
205+
$ref: '#/components/schemas/ResourceRef'
206+
networkingInfo:
207+
$ref: '#/components/schemas/ResourceNetworkingInfo'
208+
resourceVersion:
209+
type: string
210+
health:
211+
$ref: '#/components/schemas/HealthStatus'
179212

180213
ResourceRef:
181214
type: object
@@ -193,6 +226,14 @@ components:
193226
uid:
194227
type: string
195228

229+
ResourceNetworkingInfo:
230+
type: object
231+
properties:
232+
labels:
233+
type: object
234+
additionalProperties:
235+
type: string
236+
196237
PodMetadata:
197238
type: object
198239
properties:
@@ -223,77 +264,18 @@ components:
223264
isExternal:
224265
type: boolean
225266

226-
ResourceNode:
267+
HealthStatus:
227268
type: object
228269
properties:
229-
group:
230-
type: string
231-
version:
232-
type: string
233-
kind:
234-
type: string
235-
namespace:
236-
type: string
237-
name:
238-
type: string
239-
uid:
240-
type: string
241-
parentRefs:
242-
type: array
243-
items:
244-
$ref: '#/components/schemas/ResourceRef'
245-
networkingInfo:
246-
$ref: '#/components/schemas/ResourceNetworkingInfo'
247-
resourceVersion:
248-
type: string
249-
health:
250-
$ref: '#/components/schemas/HealthStatus'
251-
isHibernated:
252-
type: boolean
253-
canBeHibernated:
254-
type: boolean
255-
info:
256-
type: array
257-
items:
258-
$ref: '#/components/schemas/InfoItem'
259-
createdAt:
270+
status:
260271
type: string
261-
format: date-time
262-
port:
263-
type: array
264-
items:
265-
type: integer
266-
isHook:
267-
type: boolean
268-
hookType:
272+
message:
269273
type: string
270274

271-
ResourceTreeResponse:
272-
type: object
273-
properties:
274-
nodes:
275-
type: array
276-
items:
277-
$ref: '#/components/schemas/ResourceNode'
278-
podMetadata:
279-
type: array
280-
items:
281-
$ref: '#/components/schemas/PodMetadata'
282-
283-
FluxApplicationDetailDto:
284-
type: object
285-
properties:
286-
FluxApplication:
287-
$ref: '#/components/schemas/FluxAppDto'
288-
FluxAppStatusDetail:
289-
$ref: '#/components/schemas/FluxAppStatusDetail'
290-
ResourceTreeResponse:
291-
$ref: '#/components/schemas/ResourceTreeResponse'
292-
293275
Error:
294276
type: object
295277
properties:
278+
code:
279+
type: string
296280
message:
297281
type: string
298-
description: Error message
299-
example: unauthorized

specs/image-tagging.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ paths:
1111
content:
1212
application/json:
1313
schema:
14-
items:
15-
$ref: "#/components/schemas/ImageTaggingRequestDTO"
14+
$ref: "#/components/schemas/ImageTaggingRequestDTO"
1615
responses:
1716
"200":
1817
description: success on tags and comment creation for the given artifact.
@@ -34,7 +33,7 @@ paths:
3433
content:
3534
application/json:
3635
schema:
37-
$ref: "#components/schemas/ImageTaggingResponseDTO"
36+
$ref: "#/components/schemas/ImageTaggingResponseDTO"
3837
"500":
3938
description: will get this response if any failure occurs at server side.
4039
"403":
@@ -61,7 +60,11 @@ components:
6160
appReleaseTags:
6261
type: array
6362
items:
64-
$ref: '#/components/schemas/ReleaseTag'
63+
type: string
64+
description: List of unique tag names in the app
65+
hideImageTaggingHardDelete:
66+
type: boolean
67+
description: Whether hard delete of tags is hidden
6568

6669

6770

@@ -109,15 +112,19 @@ components:
109112
items:
110113
$ref: '#/components/schemas/ReleaseTag'
111114
description: tag objects requested for creation
112-
updateTags:
115+
softDeleteTags:
116+
type: array
117+
items:
118+
$ref: '#/components/schemas/ReleaseTag'
119+
description: tag objects requested for soft deletion
120+
hardDeleteTags:
113121
type: array
114122
items:
115123
$ref: '#/components/schemas/ReleaseTag'
116-
description: tag objects requested for deletion
124+
description: tag objects requested for hard deletion
117125
imageComment:
118126
type: object
119-
items:
120-
$ref: '#/components/schemas/ImageComment'
127+
$ref: '#/components/schemas/ImageComment'
121128
description: image comment data
122129

123130

0 commit comments

Comments
 (0)