support multiple containers in a pod (#1394)
This commit is contained in:
@@ -32,6 +32,8 @@ import (
|
||||
const (
|
||||
// LabelServiceType defines the type of service to be created
|
||||
LabelServiceType = "kompose.service.type"
|
||||
// LabelServiceGroup defines the group of services in a single pod
|
||||
LabelServiceGroup = "kompose.service.group"
|
||||
// LabelNodePortPort defines the port value for NodePort service
|
||||
LabelNodePortPort = "kompose.service.nodeport.port"
|
||||
// LabelServiceExpose defines if the service needs to be made accessible from outside the cluster or not
|
||||
|
||||
@@ -178,6 +178,7 @@ func libComposeToKomposeMapping(composeObject *project.Project) (kobject.Kompose
|
||||
// all relevant information as well as avoid the unsupported keys as well.
|
||||
for name, composeServiceConfig := range composeObject.ServiceConfigs.All() {
|
||||
serviceConfig := kobject.ServiceConfig{}
|
||||
serviceConfig.Name = name
|
||||
serviceConfig.Image = composeServiceConfig.Image
|
||||
serviceConfig.Build = composeServiceConfig.Build.Context
|
||||
newName := normalizeContainerNames(composeServiceConfig.ContainerName)
|
||||
|
||||
@@ -364,6 +364,7 @@ func dockerComposeToKomposeMapping(composeObject *types.Config) (kobject.Kompose
|
||||
// No need to modify before importation
|
||||
name := composeServiceConfig.Name
|
||||
serviceConfig := kobject.ServiceConfig{}
|
||||
serviceConfig.Name = name
|
||||
serviceConfig.Image = composeServiceConfig.Image
|
||||
serviceConfig.WorkingDir = composeServiceConfig.WorkingDir
|
||||
serviceConfig.Annotations = map[string]string(composeServiceConfig.Labels)
|
||||
|
||||
Reference in New Issue
Block a user