forked from LaconicNetwork/kompose
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user