-
Notifications
You must be signed in to change notification settings - Fork 474
/
app.go
71 lines (57 loc) · 1.77 KB
/
app.go
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
package models
type AppList struct {
// Namespace where the apps live in
// required: true
// example: bookinfo
Namespace Namespace `json:"namespace"`
// Applications for a given namespace
// required: true
Apps []AppListItem `json:"applications"`
}
// AppListItem has the necessary information to display the console app list
type AppListItem struct {
// Name of the application
// required: true
// example: reviews
Name string `json:"name"`
// Define if all Pods related to the Workloads of this app has an IstioSidecar deployed
// required: true
// example: true
IstioSidecar bool `json:"istioSidecar"`
// Labels for App
Labels map[string]string `json:"labels"`
// Istio References
IstioReferences []*IstioValidationKey `json:"istioReferences"`
}
type WorkloadItem struct {
// Name of a workload member of an application
// required: true
// example: reviews-v1
WorkloadName string `json:"workloadName"`
// Define if all Pods related to the Workload has an IstioSidecar deployed
// required: true
// example: true
IstioSidecar bool `json:"istioSidecar"`
// List of service accounts involved in this application
// required: true
// example: productpage, reviews, details
ServiceAccountNames []string `json:"serviceAccountNames"`
}
type App struct {
// Namespace where the app lives in
// required: true
// example: bookinfo
Namespace Namespace `json:"namespace"`
// Name of the application
// required: true
// example: reviews
Name string `json:"name"`
// Workloads for a given application
// required: true
Workloads []WorkloadItem `json:"workloads"`
// List of service names linked with an application
// required: true
ServiceNames []string `json:"serviceNames"`
// Runtimes and associated dashboards
Runtimes []Runtime `json:"runtimes"`
}