Added support for replicas keys in v3

resolves #644 `replicas` key
This commit is contained in:
Suraj Narwade
2017-07-04 12:40:12 +05:30
parent eb808c36ff
commit 041d7f7d61
8 changed files with 56 additions and 14 deletions
+5
View File
@@ -192,6 +192,11 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose
serviceConfig.Command = composeServiceConfig.Entrypoint
serviceConfig.Args = composeServiceConfig.Command
//Handling replicas
if composeServiceConfig.Deploy.Replicas != nil {
serviceConfig.Replicas = int(*composeServiceConfig.Deploy.Replicas)
}
// This is a bit messy since we use yaml.MemStringorInt
// TODO: Refactor yaml.MemStringorInt in kobject.go to int64
// Since Deploy.Resources.Limits does not initialize, we must check type Resources before continuing