|
193 | 193 | } |
194 | 194 | } |
195 | 195 | }, |
| 196 | + "containerFile": { |
| 197 | + "description": "The details of a file to mount in the container. One of 'source', 'content', or 'binaryContent' must be provided.", |
| 198 | + "type": "object", |
| 199 | + "additionalProperties": false, |
| 200 | + "properties": { |
| 201 | + "target": { |
| 202 | + "description": "(Deprecated) The file path to expose in the container. This is only used in Score workloads that describe files as an array.", |
| 203 | + "deprecated": true, |
| 204 | + "type": "string", |
| 205 | + "minLength": 1 |
| 206 | + }, |
| 207 | + "mode": { |
| 208 | + "description": "The optional file access mode in octal encoding. For example 0600.", |
| 209 | + "type": "string", |
| 210 | + "pattern": "^0?[0-7]{3}$" |
| 211 | + }, |
| 212 | + "source": { |
| 213 | + "description": "The relative or absolute path to the content file.", |
| 214 | + "type": "string", |
| 215 | + "minLength": 1 |
| 216 | + }, |
| 217 | + "content": { |
| 218 | + "description": "The inline content for the file. Only supports valid utf-8.", |
| 219 | + "type": "string" |
| 220 | + }, |
| 221 | + "binaryContent": { |
| 222 | + "description": "Inline standard-base64 encoded content for the file. Does not support placeholder expansion.", |
| 223 | + "type": "string" |
| 224 | + }, |
| 225 | + "noExpand": { |
| 226 | + "description": "If set to true, the placeholders expansion will not occur in the contents of the file.", |
| 227 | + "type": "boolean" |
| 228 | + } |
| 229 | + }, |
| 230 | + "oneOf": [ |
| 231 | + { |
| 232 | + "required": [ |
| 233 | + "content" |
| 234 | + ] |
| 235 | + }, |
| 236 | + { |
| 237 | + "required": [ |
| 238 | + "binaryContent" |
| 239 | + ] |
| 240 | + }, |
| 241 | + { |
| 242 | + "required": [ |
| 243 | + "source" |
| 244 | + ] |
| 245 | + } |
| 246 | + ] |
| 247 | + }, |
| 248 | + "containerVolume": { |
| 249 | + "type": "object", |
| 250 | + "additionalProperties": false, |
| 251 | + "required": [ |
| 252 | + "source" |
| 253 | + ], |
| 254 | + "properties": { |
| 255 | + "source": { |
| 256 | + "description": "The external volume reference.", |
| 257 | + "type": "string" |
| 258 | + }, |
| 259 | + "path": { |
| 260 | + "description": "An optional sub path in the volume.", |
| 261 | + "type": "string" |
| 262 | + }, |
| 263 | + "target": { |
| 264 | + "description": "(Deprecated) The target mount on the container. This is only used in Score workloads that describe volumes as an array.", |
| 265 | + "deprecated": true, |
| 266 | + "type": "string" |
| 267 | + }, |
| 268 | + "readOnly": { |
| 269 | + "description": "Indicates if the volume should be mounted in a read-only mode.", |
| 270 | + "type": "boolean" |
| 271 | + } |
| 272 | + } |
| 273 | + }, |
196 | 274 | "container": { |
197 | 275 | "description": "The specification of a Container within the Workload.", |
198 | 276 | "type": "object", |
|
232 | 310 | } |
233 | 311 | }, |
234 | 312 | "files": { |
235 | | - "description": "The extra files to mount into the container.", |
236 | | - "type": "array", |
237 | | - "items": { |
238 | | - "description": "The details of a file to mount in the container. One of 'source', 'content', or 'binaryContent' must be provided.", |
239 | | - "type": "object", |
240 | | - "required": [ |
241 | | - "target" |
242 | | - ], |
243 | | - "additionalProperties": false, |
244 | | - "properties": { |
245 | | - "target": { |
246 | | - "description": "The file path to expose in the container.", |
247 | | - "type": "string", |
248 | | - "minLength": 1 |
249 | | - }, |
250 | | - "mode": { |
251 | | - "description": "The optional file access mode in octal encoding. For example 0600.", |
252 | | - "type": "string", |
253 | | - "pattern": "^0?[0-7]{3}$" |
254 | | - }, |
255 | | - "source": { |
256 | | - "description": "The relative or absolute path to the content file.", |
257 | | - "type": "string", |
258 | | - "minLength": 1 |
259 | | - }, |
260 | | - "content": { |
261 | | - "description": "The inline content for the file. Only supports valid utf-8.", |
262 | | - "type": "string" |
263 | | - }, |
264 | | - "binaryContent": { |
265 | | - "description": "Inline standard-base64 encoded content for the file. Does not support placeholder expansion.", |
266 | | - "type": "string" |
267 | | - }, |
268 | | - "noExpand": { |
269 | | - "description": "If set to true, the placeholders expansion will not occur in the contents of the file.", |
270 | | - "type": "boolean" |
| 313 | + "description": "The extra files to mount into the container. Described as a map of target paths to file details. The array form is deprecated.", |
| 314 | + "oneOf": [ |
| 315 | + { |
| 316 | + "type": "array", |
| 317 | + "deprecated": true, |
| 318 | + "items": { |
| 319 | + "$ref": "#/$defs/containerFile" |
271 | 320 | } |
272 | 321 | }, |
273 | | - "oneOf": [ |
274 | | - { |
275 | | - "required": [ |
276 | | - "target", |
277 | | - "content" |
278 | | - ] |
279 | | - }, |
280 | | - { |
281 | | - "required": [ |
282 | | - "target", |
283 | | - "binaryContent" |
284 | | - ] |
285 | | - }, |
286 | | - { |
287 | | - "required": [ |
288 | | - "target", |
289 | | - "source" |
290 | | - ] |
| 322 | + { |
| 323 | + "type": "object", |
| 324 | + "additionalProperties": { |
| 325 | + "$ref": "#/$defs/containerFile" |
291 | 326 | } |
292 | | - ] |
293 | | - } |
| 327 | + } |
| 328 | + ] |
294 | 329 | }, |
295 | 330 | "volumes": { |
296 | | - "description": "The volumes to mount.", |
297 | | - "type": "array", |
298 | | - "items": { |
299 | | - "type": "object", |
300 | | - "additionalProperties": false, |
301 | | - "required": [ |
302 | | - "source", |
303 | | - "target" |
304 | | - ], |
305 | | - "properties": { |
306 | | - "source": { |
307 | | - "description": "The external volume reference.", |
308 | | - "type": "string" |
309 | | - }, |
310 | | - "path": { |
311 | | - "description": "An optional sub path in the volume.", |
312 | | - "type": "string" |
313 | | - }, |
314 | | - "target": { |
315 | | - "description": "The target mount on the container.", |
316 | | - "type": "string" |
317 | | - }, |
318 | | - "readOnly": { |
319 | | - "description": "Indicates if the volume should be mounted in a read-only mode.", |
320 | | - "type": "boolean" |
| 331 | + "description": "The volumes to mount. Described as a map of target paths to volume details. The array form is deprecated.", |
| 332 | + "oneOf": [ |
| 333 | + { |
| 334 | + "type": "array", |
| 335 | + "deprecated": true, |
| 336 | + "items": { |
| 337 | + "$ref": "#/$defs/containerVolume" |
| 338 | + } |
| 339 | + }, |
| 340 | + { |
| 341 | + "type": "object", |
| 342 | + "additionalProperties": { |
| 343 | + "$ref": "#/$defs/containerVolume" |
321 | 344 | } |
322 | 345 | } |
323 | | - } |
| 346 | + ] |
324 | 347 | }, |
325 | 348 | "resources": { |
326 | 349 | "description": "The compute resources for the container.", |
|
0 commit comments