|
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" |
| 322 | + { |
| 323 | + "type": "object", |
| 324 | + "additionalProperties": { |
| 325 | + "allOf": [ |
| 326 | + { |
| 327 | + "not": { |
| 328 | + "type": "object", |
| 329 | + "additionalProperties": true, |
| 330 | + "required": ["target"] |
| 331 | + } |
| 332 | + }, |
| 333 | + { |
| 334 | + "$ref": "#/$defs/containerFile" |
| 335 | + } |
290 | 336 | ]
|
291 | 337 | }
|
292 |
| - ] |
293 |
| - } |
| 338 | + } |
| 339 | + ] |
294 | 340 | },
|
295 | 341 | "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" |
| 342 | + "description": "The volumes to mount. Described as a map of target paths to volume details. The array form is deprecated.", |
| 343 | + "oneOf": [ |
| 344 | + { |
| 345 | + "type": "array", |
| 346 | + "deprecated": true, |
| 347 | + "items": { |
| 348 | + "$ref": "#/$defs/containerVolume" |
| 349 | + } |
| 350 | + }, |
| 351 | + { |
| 352 | + "type": "object", |
| 353 | + "additionalProperties": { |
| 354 | + "allOf": [ |
| 355 | + { |
| 356 | + "not": { |
| 357 | + "type": "object", |
| 358 | + "additionalProperties": true, |
| 359 | + "required": ["target"] |
| 360 | + } |
| 361 | + }, |
| 362 | + { |
| 363 | + "$ref": "#/$defs/containerVolume" |
| 364 | + } |
| 365 | + ] |
321 | 366 | }
|
322 | 367 | }
|
323 |
| - } |
| 368 | + ] |
324 | 369 | },
|
325 | 370 | "resources": {
|
326 | 371 | "description": "The compute resources for the container.",
|
|
0 commit comments