Provide ability to run preStop command

Change-Id: Ia6b7db68980d99555f23c0c568b6b9cf34b70968
This commit is contained in:
Mikhail 2017-03-23 14:48:11 +04:00
parent de44c2957f
commit 269812a0e4
3 changed files with 10 additions and 1 deletions

View File

@ -17,4 +17,4 @@ import pbr.version
version_info = pbr.version.VersionInfo("fuel_ccp") version_info = pbr.version.VersionInfo("fuel_ccp")
__version__ = version_info.version_string() __version__ = version_info.version_string()
dsl_version = "0.8.0" dsl_version = "0.9.0"

View File

@ -214,6 +214,9 @@ def serialize_daemon_container_spec(container):
cont_spec.update(liveness_spec) cont_spec.update(liveness_spec)
cont_spec["securityContext"] = {"privileged": cont_spec["securityContext"] = {"privileged":
container.get("privileged", False)} container.get("privileged", False)}
lifecycle = container.get("lifecycle", None)
if lifecycle:
cont_spec["lifecycle"] = lifecycle
return cont_spec return cont_spec

View File

@ -299,6 +299,12 @@ SERVICE_SCHEMA = {
"liveness": PROBE_SCHEMA "liveness": PROBE_SCHEMA
} }
}, },
"lifecycle": {"type": "object",
"properties":
{"PreStop": {
"type": "object"
}}
},
"volumes": { "volumes": {
"type": "array", "type": "array",
"minItems": 1, "minItems": 1,