support multiple containers in a pod (#1394)

This commit is contained in:
tk42
2021-07-08 09:48:05 +08:00
committed by GitHub
parent c51d59566b
commit deb00f3407
12 changed files with 801 additions and 87 deletions
+5
View File
@@ -77,6 +77,8 @@ type ConvertOptions struct {
YAMLIndent int
WithKomposeAnnotation bool
MultipleContainerMode bool
}
// IsPodController indicate if the user want to use a controller
@@ -84,8 +86,11 @@ func (opt *ConvertOptions) IsPodController() bool {
return opt.IsDeploymentFlag || opt.IsDaemonSetFlag || opt.IsReplicationControllerFlag || opt.Controller != ""
}
type ServiceConfigGroup []ServiceConfig
// ServiceConfig holds the basic struct of a container
type ServiceConfig struct {
Name string
ContainerName string
Image string `compose:"image"`
Environment []EnvVar `compose:"environment"`