Merge "Adding ability to specify image for single commands"
This commit is contained in:
commit
f1788a9803
@ -38,6 +38,7 @@ Application definition template
|
||||
- some-service
|
||||
- some-other-service
|
||||
type: single
|
||||
image: some_image
|
||||
command: /tmp/bootstrap.sh
|
||||
files:
|
||||
- bootstrap.sh
|
||||
@ -263,9 +264,15 @@ command
|
||||
* - name
|
||||
- Name of the command. Required only for `pre` and `post` with type
|
||||
`single`.
|
||||
- --
|
||||
-
|
||||
- string
|
||||
- --
|
||||
-
|
||||
* - image
|
||||
- Image that will be used to run the command. Can be used only for `pre`
|
||||
and `post` with type `single`.
|
||||
- false
|
||||
- string
|
||||
- same as for daemon
|
||||
* - command
|
||||
- --
|
||||
- true
|
||||
|
@ -17,4 +17,4 @@ import pbr.version
|
||||
|
||||
version_info = pbr.version.VersionInfo("fuel_ccp")
|
||||
__version__ = version_info.version_string()
|
||||
dsl_version = "0.4.0"
|
||||
dsl_version = "0.5.0"
|
||||
|
@ -166,7 +166,7 @@ def serialize_daemon_container_spec(container):
|
||||
def serialize_job_container_spec(container, job):
|
||||
return {
|
||||
"name": job["name"],
|
||||
"image": images.image_spec(container["image"]),
|
||||
"image": images.image_spec(job.get('image') or container["image"]),
|
||||
"imagePullPolicy": CONF.kubernetes.image_pull_policy,
|
||||
"command": _get_start_cmd(job["name"]),
|
||||
"volumeMounts": serialize_volume_mounts(container, job),
|
||||
|
@ -54,6 +54,7 @@ LOCAL_COMMAND_SCHEMA = {
|
||||
SINGLE_COMMAND_SCHEMA = copy.deepcopy(LOCAL_COMMAND_SCHEMA)
|
||||
SINGLE_COMMAND_SCHEMA["required"] = ["name", "command", "type"]
|
||||
SINGLE_COMMAND_SCHEMA["properties"]["type"]["enum"] = ["single"]
|
||||
SINGLE_COMMAND_SCHEMA["properties"]["image"] = NOT_EMPTY_STRING_SCHEMA
|
||||
|
||||
COMMAND_SCHEMA = {
|
||||
"type": "object",
|
||||
|
Loading…
Reference in New Issue
Block a user