Repository navigation
Expand file tree
/
Copy pathmetadata.schema.json
More file actions
178 lines (178 loc) · 4.22 KB
/
Copy pathmetadata.schema.json
File metadata and controls
178 lines (178 loc) · 4.22 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
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
{
"$schema": "https://json-schema.org/draft-06/schema#",
"$id": "https://github.com/openshift/managed-scripts/metadata.schema.json",
"title": "Metadata",
"description": "Metadata for managed scripts",
"type": "object",
"properties": {
"file": {
"description": "File name of the script",
"type": "string"
},
"name": {
"description": "Parent directory name of the script",
"type": "string"
},
"shortDescription": {
"description": "A shorter description for tables and lists",
"type": "string"
},
"description": {
"description": "A brief description of the script",
"type": "string"
},
"author": {
"description": "Github username of the author",
"type": "string"
},
"language": {
"description": "The script language",
"type": "string",
"enum": [
"python",
"bash"
]
},
"allowedGroups": {
"description": "Groups who are allowed to run the script",
"type": "array",
"items": {
"type": "string"
}
},
"labels": {
"type": "array",
"description": "Labels that apply to this script",
"items": {
"type": "object",
"properties": {
"key": {
"description": "Key of the label",
"type": "string"
},
"description": {
"description": "A brief description of the label",
"type": "string"
},
"values": {
"description": "Values for the label",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"envs": {
"type": "array",
"description": "The environment variables declared on the script",
"additionalProperties": false,
"items": {
"type": "object",
"properties": {
"key": {
"description": "Key of the environment variable",
"type": "string"
},
"description": {
"description": "A brief description of the environment variable",
"type": "string"
},
"optional": {
"description": "Whether or not this environment variable is optional",
"type": "boolean"
}
}
}
},
"rbac": {
"type": "object",
"additionalProperties": false,
"properties": {
"roles": {
"type": "array",
"items": {
"$ref": "#/$defs/roleRule"
}
},
"clusterRoleRules": {
"type": "array",
"items": {
"$ref": "#/$defs/rules"
}
}
}
},
"clusterVersions": {
"type": "array",
"description": "List of required cluster versions, supporting 'major.minor.patch' format and wildcards",
"additionalProperties": false,
"items": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$|^\\d+\\.\\d+\\.\\*$"
}
},
"customerDataAccess": {
"type": "boolean",
"description": "Wether or not this script has access to customer data"
}
},
"additionalProperties": false,
"required": [
"file",
"name",
"description",
"author",
"language",
"allowedGroups",
"customerDataAccess"
],
"$defs": {
"rules": {
"type": "object",
"properties": {
"verbs": {
"type": "array",
"items": {
"type": "string"
}
},
"apiGroups": {
"type": "array",
"items": {
"type": "string"
}
},
"resources": {
"type": "array",
"items": {
"type": "string"
}
},
"resourceNames": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [ "verbs", "apiGroups", "resources" ]
},
"roleRule": {
"type": "object",
"properties": {
"namespace": {
"type": "string"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/$defs/rules"
}
}
},
"required": [ "namespace", "rules" ]
}
}
}