-
Notifications
You must be signed in to change notification settings - Fork 527
/
Copy pathapplist.proto
444 lines (382 loc) · 10.5 KB
/
applist.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
syntax = "proto3";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/devtron-labs/kubelink/bean/grpc/gRPC";
message ClusterConfig {
string apiServerUrl = 1;
string token = 2;
int32 clusterId = 3;
string clusterName = 4;
bool insecureSkipTLSVerify = 5;
string keyData = 6;
string certData = 7;
string caData = 8;
}
message AppListRequest {
repeated ClusterConfig clusters = 1;
}
service ApplicationService {
rpc ListApplications(AppListRequest) returns (stream DeployedAppList){}
rpc ListFluxApplications(AppListRequest) returns (stream FluxApplicationList){}
rpc GetAppDetail(AppDetailRequest) returns (AppDetail){}
rpc GetAppStatus(AppDetailRequest) returns (AppStatus){}
rpc Hibernate(HibernateRequest) returns (HibernateResponse){}
rpc UnHibernate(HibernateRequest) returns (HibernateResponse){}
rpc GetDeploymentHistory(AppDetailRequest) returns (HelmAppDeploymentHistory){}
rpc GetValuesYaml(AppDetailRequest) returns (ReleaseInfo){}
rpc GetDesiredManifest(ObjectRequest) returns (DesiredManifestResponse){}
rpc UninstallRelease(ReleaseIdentifier) returns (UninstallReleaseResponse){}
rpc UpgradeRelease(UpgradeReleaseRequest) returns (UpgradeReleaseResponse){}
rpc GetDeploymentDetail(DeploymentDetailRequest) returns (DeploymentDetailResponse){}
rpc InstallRelease(InstallReleaseRequest) returns (InstallReleaseResponse){}
rpc UpgradeReleaseWithChartInfo(InstallReleaseRequest) returns (UpgradeReleaseResponse){}
rpc IsReleaseInstalled(ReleaseIdentifier) returns (BooleanResponse){}
rpc RollbackRelease(RollbackReleaseRequest) returns (BooleanResponse){}
rpc TemplateChart(InstallReleaseRequest) returns (TemplateChartResponse){}
rpc TemplateChartBulk(BulkInstallReleaseRequest) returns (BulkTemplateChartResponse){}
rpc InstallReleaseWithCustomChart(HelmInstallCustomRequest) returns (HelmInstallCustomResponse) {}
rpc GetNotes(InstallReleaseRequest) returns (ChartNotesResponse) {}
rpc UpgradeReleaseWithCustomChart(UpgradeReleaseRequest) returns(UpgradeReleaseResponse){}
rpc ValidateOCIRegistry(RegistryCredential) returns(OCIRegistryResponse) {}
rpc GetResourceTreeForExternalResources(ExternalResourceTreeRequest) returns(ResourceTreeResponse){}
rpc GetFluxAppDetail(FluxAppDetailRequest)returns(FluxAppDetail){}
rpc GetReleaseDetails(ReleaseIdentifier)returns(DeployedAppDetail){}
}
message ExternalResourceTreeRequest{
ClusterConfig clusterConfig = 1;
repeated ExternalResourceDetail externalResourceDetail = 2;
}
message ExternalResourceDetail {
string group = 1;
string kind = 2;
string version = 3;
string name = 4;
string namespace = 5;
}
message FluxApplicationList {
int32 clusterId = 1;
repeated FluxApplication FluxApplication =2;
string errorMsg = 3;
bool errored = 4;
}
message FluxApplication{
string name=1;
string healthStatus=2;
string syncStatus=3;
EnvironmentDetails environmentDetail = 4;
string fluxAppDeploymentType=5;
}
//---------------flux external app detail-------
message FluxAppDetailRequest{
ClusterConfig clusterConfig = 1;
string namespace = 2;
string name = 3;
bool IsKustomizeApp =4;
}
message FluxAppDetail{
FluxApplication fluxApplication=1;
FluxAppStatusDetail FluxAppStatusDetail = 2;
ResourceTreeResponse resourceTreeResponse =3;
}
message FluxAppStatusDetail{
string Status = 1;
string Reason = 2;
string Message = 3;
}
//---------------flux external app detail ends here-------
message DeployedAppList {
repeated DeployedAppDetail DeployedAppDetail = 1;
int32 clusterId = 2;
string errorMsg = 3;
bool errored = 4;
}
message DeployedAppDetail {
string appId = 1;
string appName = 2;
string chartName = 3;
string chartAvatar = 4;
EnvironmentDetails environmentDetail = 5;
google.protobuf.Timestamp LastDeployed = 6;
string chartVersion = 7;
}
message EnvironmentDetails{
string clusterName = 1;
int32 clusterId = 2;
string namespace = 3;
}
//---------------app detail-------
message AppDetailRequest {
ClusterConfig clusterConfig = 1;
string namespace = 2;
string ReleaseName = 3;
// Map key cannot be float, double, bytes, message, or enum types (map<Gvk, Labels> could be a better option)
ResourceTreeFilter resourceTreeFilter = 4;
}
message AppDetail{
string applicationStatus = 1;
ReleaseStatus releaseStatus = 2;
google.protobuf.Timestamp lastDeployed = 6;
ChartMetadata chartMetadata = 7;
ResourceTreeResponse resourceTreeResponse = 8;
EnvironmentDetails environmentDetails = 9;
bool ReleaseExist = 10;
}
message AppStatus{
string applicationStatus = 1;
string ReleaseStatus = 2;
string Description = 3;
google.protobuf.Timestamp LastDeployed = 4;
}
message ReleaseStatus {
string status = 1;
string message = 2;
string description = 3;
}
message ChartMetadata {
string chartName = 1;
string chartVersion = 2;
string home = 3;
repeated string sources = 4;
string description = 5;
// Contains the rendered templates/NOTES.txt
string notes = 6;
}
message ResourceTreeResponse {
repeated ResourceNode nodes = 1;
repeated .PodMetadata podMetadata = 2;
}
message ResourceNode {
string group = 1;
string version = 2;
string kind = 3;
string namespace = 4;
string name = 5;
string uid = 6;
repeated ResourceRef parentRefs = 7;
ResourceNetworkingInfo networkingInfo = 8;
string resourceVersion = 9;
HealthStatus health = 10;
bool isHibernated = 11;
bool canBeHibernated = 12;
repeated InfoItem info = 13;
string createdAt = 14;
repeated int64 port = 15;
bool isHook = 16;
string hookType = 17;
}
message InfoItem {
string name = 1;
string value = 2;
}
message HealthStatus {
string status = 1;
string message = 2;
}
message ResourceNetworkingInfo {
map<string, string> labels = 1;
}
message ResourceRef {
string group = 1;
string version = 2;
string kind = 3;
string namespace = 4;
string name = 5;
string uid = 6 ;
}
message PodMetadata {
string name = 1;
string uid = 2 ;
repeated string containers = 3;
repeated string initContainers = 4;
bool isNew = 5;
repeated EphemeralContainerData ephemeralContainers = 6;
}
message EphemeralContainerData {
string name = 1;
bool isExternal = 2;
}
//--------hibernate
message HibernateRequest {
ClusterConfig clusterConfig = 1;
repeated ObjectIdentifier objectIdentifier = 2;
}
message ObjectIdentifier {
string group = 1;
string kind = 2;
string version = 3;
string name = 4;
string namespace = 5;
}
message HibernateStatus{
ObjectIdentifier targetObject = 1;
bool success = 2;
string errorMsg = 3;
}
message HibernateResponse{
repeated HibernateStatus status = 1;
}
//------------------- deployment history
message HelmAppDeploymentDetail {
ChartMetadata chartMetadata = 1;
repeated string dockerImages = 2;
int32 version = 3;
google.protobuf.Timestamp deployedAt = 4;
string deployedBy = 5;
string status = 6;
}
message HelmAppDeploymentHistory {
repeated HelmAppDeploymentDetail deploymentHistory = 1;
}
message ReleaseInfo{
DeployedAppDetail deployedAppDetail = 1;
string defaultValues = 2;
string overrideValues = 3;
string mergedValues = 4;
string readme = 5;
string valuesSchemaJson = 6;
}
message ObjectRequest {
ClusterConfig clusterConfig = 1;
ObjectIdentifier objectIdentifier = 2;
string releaseName = 3;
string releaseNamespace = 4;
}
message DesiredManifestResponse {
string manifest = 1;
}
message UninstallReleaseResponse {
bool success = 1;
}
message ReleaseIdentifier {
ClusterConfig clusterConfig = 1;
string releaseName = 2;
string releaseNamespace = 3;
}
message UpgradeReleaseRequest {
ReleaseIdentifier releaseIdentifier = 1;
string valuesYaml = 2;
int32 historyMax = 3;
ChartContent chartContent = 4;
bool RunInCtx = 5;
string K8sVersion = 6;
}
message UpgradeReleaseResponse {
bool success = 1;
}
message DeploymentDetailRequest {
ReleaseIdentifier releaseIdentifier = 1;
int32 deploymentVersion = 2;
}
message DeploymentDetailResponse {
string manifest = 1;
string valuesYaml = 2;
}
message ChartRepository {
string name = 1;
string url = 2;
string username = 3;
string password = 4;
bool allowInsecureConnection = 5;
}
message InstallReleaseRequest {
ReleaseIdentifier releaseIdentifier = 1;
string chartName = 2;
string chartVersion = 3;
string valuesYaml = 4;
ChartRepository chartRepository = 5;
string K8sVersion = 6;
int32 historyMax = 7;
RegistryCredential RegistryCredential = 8;
bool IsOCIRepo = 9;
int32 installAppVersionHistoryId = 10;
ChartContent chartContent = 11;
string appName=12;
}
message BulkInstallReleaseRequest{
repeated InstallReleaseRequest BulkInstallReleaseRequest=1;
}
message InstallReleaseResponse {
bool success = 1;
}
message BooleanResponse {
bool result = 1;
}
message RollbackReleaseRequest {
ReleaseIdentifier releaseIdentifier = 1;
int32 version = 2;
}
message TemplateChartResponse {
string generatedManifest = 1;
string appName=2;
}
message BulkTemplateChartResponse {
repeated TemplateChartResponse BulkTemplateChartResponse=1;
}
message HelmInstallCustomRequest {
string valuesYaml = 1;
ChartContent chartContent = 2;
ReleaseIdentifier releaseIdentifier = 3;
bool RunInCtx = 4;
string K8sVersion = 5;
}
message HelmInstallCustomResponse {
bool success = 1;
}
message ChartContent {
bytes Content = 1;
}
message Gvk {
string Group = 1;
string Version = 2;
string Kind = 3;
}
message ResourceFilter {
Gvk gvk = 1;
ResourceIdentifier resourceIdentifier = 2;
}
message ResourceIdentifier {
map<string, string> labels = 1;
}
message ResourceTreeFilter {
ResourceIdentifier globalFilter = 1;
repeated ResourceFilter resourceFilters = 2;
}
message ChartNotesResponse{
string notes = 1;
}
message RegistryCredential {
string RegistryUrl = 1;
string Username = 2;
string Password = 3;
string AwsRegion = 4;
string AccessKey = 5;
string SecretKey = 6;
string RegistryType = 7;
string RepoName = 8;
bool IsPublic = 9;
RemoteConnectionConfig RemoteConnectionConfig = 10;
string Connection = 11;
string RegistryName = 12;
string RegistryCertificate = 13;
}
message RemoteConnectionConfig {
RemoteConnectionMethod RemoteConnectionMethod = 1;
ProxyConfig ProxyConfig = 2;
SSHTunnelConfig SSHTunnelConfig = 3;
}
enum RemoteConnectionMethod {
PROXY = 0;
SSH = 1;
DIRECT = 2;
}
message ProxyConfig {
string ProxyUrl = 1;
}
message SSHTunnelConfig {
string SSHServerAddress = 1;
string SSHUsername = 2;
string SSHPassword = 3;
string SSHAuthKey = 4;
}
message OCIRegistryResponse {
bool IsLoggedIn = 1;
}