set strategy to Recreate if vols, add tests,docs

When volumes are specified in the Docker Compose
files, then in case of Kubernetes, Deployment's
Spec.Strategy.Type and in case of OpenShift,
DeploymentConfig's Spec.Strategy.Type are set to
"Recreate". This is a safer deployment strategy
when Volumes are getting used.

This commit also adds unit tests for Kubernetes
as well as OpenShift, and fixes the failing
functional tests (tests.sh) due to the change.

No functional tests have been added since
the functionality is already covered when the
volume mounts are being tested earlier in the
file.

This fixes #264
This commit is contained in:
Shubham Minglani
2017-02-20 11:44:43 +05:30
parent fb042c7b20
commit b73efa54f2
13 changed files with 926 additions and 823 deletions
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -177,7 +177,9 @@
"restartPolicy": "Always"
}
},
"strategy": {}
"strategy": {
"type": "Recreate"
}
},
"status": {}
},
+2 -1
View File
@@ -177,7 +177,8 @@
},
"spec": {
"strategy": {
"resources": {}
"resources": {},
"type": "Recreate"
},
"triggers": [
{
@@ -203,7 +203,9 @@
"restartPolicy": "Always"
}
},
"strategy": {}
"strategy": {
"type": "Recreate"
}
},
"status": {}
},
@@ -190,6 +190,7 @@
},
"spec": {
"strategy": {
"type": "Recreate",
"resources": {}
},
"triggers": [
@@ -75,7 +75,9 @@
"restartPolicy": "Always"
}
},
"strategy": {}
"strategy": {
"type": "Recreate"
}
},
"status": {}
},
@@ -41,7 +41,8 @@
},
"spec": {
"strategy": {
"resources": {}
"resources": {},
"type": "Recreate"
},
"triggers": [
{
@@ -106,7 +106,9 @@
"restartPolicy": "Always"
}
},
"strategy": {}
"strategy": {
"type": "Recreate"
}
},
"status": {}
},
@@ -185,7 +187,9 @@
"restartPolicy": "Always"
}
},
"strategy": {}
"strategy": {
"type": "Recreate"
}
},
"status": {}
},
@@ -67,7 +67,8 @@
},
"spec": {
"strategy": {
"resources": {}
"resources": {},
"type": "Recreate"
},
"triggers": [
{
@@ -198,7 +199,8 @@
},
"spec": {
"strategy": {
"resources": {}
"resources": {},
"type": "Recreate"
},
"triggers": [
{