Support group service by shared volumes (#1439)

Signed-off-by: Hang Yan <hang.yan@hotmail.com>
This commit is contained in:
Hang Yan
2021-10-03 23:07:41 +08:00
committed by GitHub
parent 5d7ed192a4
commit 72ea6a3c24
10 changed files with 357 additions and 109 deletions
+8
View File
@@ -80,6 +80,8 @@ type ConvertOptions struct {
WithKomposeAnnotation bool
MultipleContainerMode bool
ServiceGroupMode string
ServiceGroupName string
}
// IsPodController indicate if the user want to use a controller
@@ -153,6 +155,7 @@ type ServiceConfig struct {
ConfigsMetaData map[string]dockerCliTypes.ConfigObjConfig `compose:""`
WithKomposeAnnotation bool `compose:""`
InGroup bool
}
// HealthChecks used to distinguish between liveness and readiness
@@ -189,6 +192,11 @@ type Ports struct {
Protocol string // Upper string
}
// ID returns an unique id for this port settings, to avoid conflict
func (port *Ports) ID() string {
return string(port.ContainerPort) + port.Protocol
}
// Volumes holds the volume struct of container
type Volumes struct {
SvcName string // Service name to which volume is linked