Set service volume size with kompose.volume.size label (#235)

1. Copy labels from compose to kobject
2. If kompose.volume.size is set on service level, use it

Internal API changes:

- Add PVCSize to kobject Volumes struct
- Pass default volume size as CreatePVC() param
This commit is contained in:
Anatoli Babenia
2017-11-12 13:05:55 +03:00
parent b6eddd7a7d
commit 1975c32740
3 changed files with 15 additions and 5 deletions
+2 -1
View File
@@ -217,7 +217,7 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose
LoadedFrom: "compose",
}
// Step 2. Parse through the object and conver it to kobject.KomposeObject!
// Step 2. Parse through the object and convert it to kobject.KomposeObject!
// Here we "clean up" the service configuration so we return something that includes
// all relevant information as well as avoid the unsupported keys as well.
for _, composeServiceConfig := range composeObject.Services {
@@ -240,6 +240,7 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose
serviceConfig.ContainerName = composeServiceConfig.ContainerName
serviceConfig.Command = composeServiceConfig.Entrypoint
serviceConfig.Args = composeServiceConfig.Command
serviceConfig.Labels = composeServiceConfig.Labels
//
// Deploy keys