From 18414f5f35e90b728fa826f64f817f455d7938d8 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Wed, 15 Feb 2017 20:45:39 +0400 Subject: [PATCH] Adding scheme field for probes Change-Id: I4dbcac825f319c6c202018f59a45de9ecbb377cc --- fuel_ccp/__init__.py | 2 +- fuel_ccp/templates.py | 3 ++- fuel_ccp/tests/test_templates.py | 3 ++- fuel_ccp/validation/service.py | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fuel_ccp/__init__.py b/fuel_ccp/__init__.py index 2d5342b2..976a853a 100644 --- a/fuel_ccp/__init__.py +++ b/fuel_ccp/__init__.py @@ -17,4 +17,4 @@ import pbr.version version_info = pbr.version.VersionInfo("fuel_ccp") __version__ = version_info.version_string() -dsl_version = "0.6.0" +dsl_version = "0.7.0" diff --git a/fuel_ccp/templates.py b/fuel_ccp/templates.py index de00b89d..95fe81f3 100644 --- a/fuel_ccp/templates.py +++ b/fuel_ccp/templates.py @@ -133,7 +133,8 @@ def serialize_liveness_probe(liveness): cont_spec["livenessProbe"] = { "httpGet": { "path": liveness["path"], - "port": liveness["port"] + "port": liveness["port"], + "scheme": liveness.get("scheme", "http").upper() }, "timeoutSeconds": liveness.get("timeout", 1), "initialDelaySeconds": liveness.get("initialDelay", 10) diff --git a/fuel_ccp/tests/test_templates.py b/fuel_ccp/tests/test_templates.py index 5078e635..32f6974d 100644 --- a/fuel_ccp/tests/test_templates.py +++ b/fuel_ccp/tests/test_templates.py @@ -132,7 +132,8 @@ class TestDeploy(base.TestCase): "livenessProbe": { "httpGet": { "path": "_status", - "port": 8080 + "port": 8080, + "scheme": "HTTP" }, "timeoutSeconds": 1, "initialDelaySeconds": 7 diff --git a/fuel_ccp/validation/service.py b/fuel_ccp/validation/service.py index 9b4ae35c..72773dd6 100644 --- a/fuel_ccp/validation/service.py +++ b/fuel_ccp/validation/service.py @@ -153,7 +153,8 @@ PROBE_SCHEMA_HTTP = { "port": PORT_SCHEMA, "path": NOT_EMPTY_STRING_SCHEMA, "initialDelay": TIMEOUT_SCHEMA, - "timeout": TIMEOUT_SCHEMA + "timeout": TIMEOUT_SCHEMA, + "scheme": {"enum": ["http", "https"]}, } }