added support for restart-policy keys in v3

Resolves `restart_policy` from issue #644
This commit is contained in:
Suraj Narwade
2017-07-06 17:44:19 +05:30
parent 06543f7535
commit 9dcb2bfba6
5 changed files with 326 additions and 693 deletions
+2 -2
View File
@@ -441,9 +441,9 @@ func (k *Kubernetes) UpdateKubernetesObjects(name string, service kobject.Servic
// Configure the container restart policy.
switch service.Restart {
case "", "always":
case "", "always", "any":
template.Spec.RestartPolicy = api.RestartPolicyAlways
case "no":
case "no", "none":
template.Spec.RestartPolicy = api.RestartPolicyNever
case "on-failure":
template.Spec.RestartPolicy = api.RestartPolicyOnFailure