-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmanifest.cue
More file actions
149 lines (141 loc) · 3.81 KB
/
manifest.cue
File metadata and controls
149 lines (141 loc) · 3.81 KB
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
package kinds
config: {
definitions: {
manifestSchemas: true
path: "definitions"
genManifest: false
genCRDs: false
}
kinds: {
grouping: "group"
perKindVersion: false
}
codegen: {
goGenPath: "apis"
tsGenPath: "plugin/src/generated/"
enableK8sPostProcessing: false // postProcess
enableOperatorStatusGeneration: true // genOperatorState
}
}
manifest: {
// appName is the unique name of your app. It is used to reference the app from other config objects,
// and to generate the group used by your app in the app platform API.
appName: "example"
// versions is a map of versions supported by your app. Version names should follow the format "v<integer>" or
// "v<integer>(alpha|beta)<integer>". Each version contains the kinds your app manages for that version.
// If your app needs access to kinds managed by another app, use permissions.accessKinds to allow your app access.
versions: {
"v0alpha1": {kinds: [testKindv0alpha1]}
"v1alpha1": v1alpha1
"v2alpha1": v2alpha1
}
preferredVersion: "v1alpha1"
// extraPermissions contains any additional permissions your app may require to function.
// Your app will always have all permissions for each kind it manages (the items defined in 'kinds').
extraPermissions: {
// If your app needs access to additional kinds supplied by other apps, you can list them here
accessKinds: [
// Here is an example for your app accessing the playlist kind for reads and watch
// {
// group: "playlist.grafana.app"
// resource: "playlists"
// actions: ["get","list","watch"]
// }
]
}
roles: {}
}
// v1alpha1 is the v1alpha1 version of the app's API.
// It includes kinds which the v1alpha1 API serves, and (future) custom routes served globally from the v1alpha1 version.
v1alpha1: {
// kinds is the list of kinds served by this version
kinds: [testKindv1alpha1]
// [OPTIONAL]
// served indicates whether this particular version is served by the API server.
// served should be set to false before a version is removed from the manifest entirely.
// served defaults to true if not present.
served: true
// [OPTIONAL]
// Codegen is a trait that tells the grafana-app-sdk, or other code generation tooling, how to process this kind.
// If not present, default values within the codegen trait are used.
// If you wish to specify codegen per-version, put this section in the version's object
// (for example, <no value>v1alpha1) instead.
codegen: {
// [OPTIONAL]
// ts contains TypeScript code generation properties for the kind
ts: {
// [OPTIONAL]
// enabled indicates whether the CLI should generate front-end TypeScript code for the kind.
// Defaults to true if not present.
enabled: true
}
// [OPTIONAL]
// go contains go code generation properties for the kind
go: {
// [OPTIONAL]
// enabled indicates whether the CLI should generate back-end go code for the kind.
// Defaults to true if not present.
enabled: true
}
}
routes: namespaced: {
"/foobar": {
"GET": {
name: "getFoobar"
response: {
foo: string
shared: #SharedType
}
request: {
query: {
foo: string
}
body: {
input: string
shared: #SharedType
}
}
}
}
}
routes: cluster: {
"/foobar": {
"GET": {
name: "getClusterFoobar"
response: {
#Extra: {
foo: string
}
bar: string
extra: {
[string]: #Extra
}
}
}
}
}
}
// Version with only custom resource routes, no kinds
v2alpha1: {
kinds: []
routes: {
namespaced: {
"/example": {
"GET": {
name: "getExample"
response: {
message: string
}
}
}
}
}
}
// Test type for go naming conflicts
#SharedType: {
bar: string
dep: [...#SharedTypeDep]
}
#SharedTypeDep: {
value: string
}