|
100 | 100 | "shm_size": {"type": ["integer", "string"]}, |
101 | 101 | "extra_hosts": {"$ref": "#/definitions/list_or_dict"}, |
102 | 102 | "isolation": {"type": "string"}, |
103 | | - "secrets": { |
104 | | - "type": "array", |
105 | | - "items": { |
106 | | - "oneOf": [ |
107 | | - {"type": "string"}, |
108 | | - { |
109 | | - "type": "object", |
110 | | - "properties": { |
111 | | - "source": {"type": "string"}, |
112 | | - "target": {"type": "string"}, |
113 | | - "uid": {"type": "string"}, |
114 | | - "gid": {"type": "string"}, |
115 | | - "mode": {"type": "number"} |
116 | | - }, |
117 | | - "additionalProperties": false, |
118 | | - "patternProperties": {"^x-": {}} |
119 | | - } |
120 | | - ] |
121 | | - } |
122 | | - } |
| 103 | + "secrets": {"$ref": "#/definitions/service_config_or_secret"} |
123 | 104 | }, |
124 | 105 | "additionalProperties": false, |
125 | 106 | "patternProperties": {"^x-": {}} |
|
162 | 143 | {"type": "array", "items": {"type": "string"}} |
163 | 144 | ] |
164 | 145 | }, |
165 | | - "configs": { |
166 | | - "type": "array", |
167 | | - "items": { |
168 | | - "oneOf": [ |
169 | | - {"type": "string"}, |
170 | | - { |
171 | | - "type": "object", |
172 | | - "properties": { |
173 | | - "source": {"type": "string"}, |
174 | | - "target": {"type": "string"}, |
175 | | - "uid": {"type": "string"}, |
176 | | - "gid": {"type": "string"}, |
177 | | - "mode": {"type": "number"} |
178 | | - }, |
179 | | - "additionalProperties": false, |
180 | | - "patternProperties": {"^x-": {}} |
181 | | - } |
182 | | - ] |
183 | | - } |
184 | | - }, |
| 146 | + "configs": {"$ref": "#/definitions/service_config_or_secret"}, |
185 | 147 | "container_name": {"type": "string"}, |
186 | 148 | "cpu_count": {"type": "integer", "minimum": 0}, |
187 | 149 | "cpu_percent": {"type": "integer", "minimum": 0, "maximum": 100}, |
|
370 | 332 | }, |
371 | 333 | "security_opt": {"type": "array", "items": {"type": "string"}, "uniqueItems": true}, |
372 | 334 | "shm_size": {"type": ["number", "string"]}, |
373 | | - "secrets": { |
374 | | - "type": "array", |
375 | | - "items": { |
376 | | - "oneOf": [ |
377 | | - {"type": "string"}, |
378 | | - { |
379 | | - "type": "object", |
380 | | - "properties": { |
381 | | - "source": {"type": "string"}, |
382 | | - "target": {"type": "string"}, |
383 | | - "uid": {"type": "string"}, |
384 | | - "gid": {"type": "string"}, |
385 | | - "mode": {"type": "number"} |
386 | | - }, |
387 | | - "additionalProperties": false, |
388 | | - "patternProperties": {"^x-": {}} |
389 | | - } |
390 | | - ] |
391 | | - } |
392 | | - }, |
| 335 | + "secrets": {"$ref": "#/definitions/service_config_or_secret"}, |
393 | 336 | "sysctls": {"$ref": "#/definitions/list_or_dict"}, |
394 | 337 | "stdin_open": {"type": "boolean"}, |
395 | 338 | "stop_grace_period": {"type": "string", "format": "duration"}, |
|
827 | 770 | "additionalProperties": false |
828 | 771 | }, |
829 | 772 |
|
| 773 | + "service_config_or_secret": { |
| 774 | + "type": "array", |
| 775 | + "items": { |
| 776 | + "oneOf": [ |
| 777 | + {"type": "string"}, |
| 778 | + { |
| 779 | + "type": "object", |
| 780 | + "properties": { |
| 781 | + "source": {"type": "string"}, |
| 782 | + "target": {"type": "string"}, |
| 783 | + "uid": {"type": "string"}, |
| 784 | + "gid": {"type": "string"}, |
| 785 | + "mode": {"type": "number"} |
| 786 | + }, |
| 787 | + "additionalProperties": false, |
| 788 | + "patternProperties": {"^x-": {}} |
| 789 | + } |
| 790 | + ] |
| 791 | + } |
| 792 | + }, |
| 793 | + |
830 | 794 | "constraints": { |
831 | 795 | "service": { |
832 | 796 | "id": "#/definitions/constraints/service", |
|
0 commit comments