fix driver:local in prefixing volumes

If we have a docker-file with root level volumes and we do a kompose up
using that docker-file, libcompose will add an additional _ followed by
the current directory name. Since kubernetes doesn't allow _ in the
objects created so kompose up will fail to deploy it. As a solution we
replace _ to - and we can then deploy it successfully.
This commit is contained in:
Abhishek
2017-04-26 20:14:22 +05:30
parent f1d2268030
commit 7eccb37c19
5 changed files with 776 additions and 1 deletions
+2 -1
View File
@@ -338,7 +338,8 @@ func (c *Compose) LoadFile(files []string) (kobject.KomposeObject, error) {
if composeServiceConfig.Volumes != nil {
for _, volume := range composeServiceConfig.Volumes.Volumes {
serviceConfig.Volumes = append(serviceConfig.Volumes, volume.String())
v := normalizeServiceNames(volume.String())
serviceConfig.Volumes = append(serviceConfig.Volumes, v)
}
}