This commit Add support for stop_grace_period which maps to
Pod.Spec.TerminationGracePeriodSeconds
Updated conversion.md on support for the key
This commit is contained in:
gitlawr
2017-05-23 12:03:14 +08:00
parent 7e785bb31f
commit c01f6f1763
5 changed files with 85 additions and 33 deletions
+31 -30
View File
@@ -59,36 +59,37 @@ type ConvertOptions struct {
// ServiceConfig holds the basic struct of a container
type ServiceConfig struct {
// use tags to mark from what element this value comes
ContainerName string
Image string `compose:"image" bundle:"Image"`
Environment []EnvVar `compose:"environment" bundle:"Env"`
Port []Ports `compose:"ports" bundle:"Ports"`
Command []string `compose:"command" bundle:"Command"`
WorkingDir string `compose:"" bundle:"WorkingDir"`
Args []string `compose:"args" bundle:"Args"`
Volumes []string `compose:"volumes" bundle:"Volumes"`
Network []string `compose:"network" bundle:"Networks"`
Labels map[string]string `compose:"labels" bundle:"Labels"`
Annotations map[string]string `compose:"" bundle:""`
CPUSet string `compose:"cpuset" bundle:""`
CPUShares int64 `compose:"cpu_shares" bundle:""`
CPUQuota int64 `compose:"cpu_quota" bundle:""`
CapAdd []string `compose:"cap_add" bundle:""`
CapDrop []string `compose:"cap_drop" bundle:""`
Expose []string `compose:"expose" bundle:""`
Privileged bool `compose:"privileged" bundle:""`
Restart string `compose:"restart" bundle:""`
User string `compose:"user" bundle:"User"`
VolumesFrom []string `compose:"volumes_from" bundle:""`
ServiceType string `compose:"kompose.service.type" bundle:""`
Build string `compose:"build" bundle:""`
BuildArgs map[string]*string `compose:"build-args" bundle:""`
ExposeService string `compose:"kompose.service.expose" bundle:""`
Stdin bool `compose:"stdin_open" bundle:""`
Tty bool `compose:"tty" bundle:""`
MemLimit yaml.MemStringorInt `compose:"mem_limit" bundle:""`
TmpFs []string `compose:"tmpfs" bundle:""`
Dockerfile string `compose:"dockerfile" bundle:""`
ContainerName string
Image string `compose:"image" bundle:"Image"`
Environment []EnvVar `compose:"environment" bundle:"Env"`
Port []Ports `compose:"ports" bundle:"Ports"`
Command []string `compose:"command" bundle:"Command"`
WorkingDir string `compose:"" bundle:"WorkingDir"`
Args []string `compose:"args" bundle:"Args"`
Volumes []string `compose:"volumes" bundle:"Volumes"`
Network []string `compose:"network" bundle:"Networks"`
Labels map[string]string `compose:"labels" bundle:"Labels"`
Annotations map[string]string `compose:"" bundle:""`
CPUSet string `compose:"cpuset" bundle:""`
CPUShares int64 `compose:"cpu_shares" bundle:""`
CPUQuota int64 `compose:"cpu_quota" bundle:""`
CapAdd []string `compose:"cap_add" bundle:""`
CapDrop []string `compose:"cap_drop" bundle:""`
Expose []string `compose:"expose" bundle:""`
Privileged bool `compose:"privileged" bundle:""`
Restart string `compose:"restart" bundle:""`
User string `compose:"user" bundle:"User"`
VolumesFrom []string `compose:"volumes_from" bundle:""`
ServiceType string `compose:"kompose.service.type" bundle:""`
StopGracePeriod string `compose:"stop_grace_period" bundle:""`
Build string `compose:"build" bundle:""`
BuildArgs map[string]*string `compose:"build-args" bundle:""`
ExposeService string `compose:"kompose.service.expose" bundle:""`
Stdin bool `compose:"stdin_open" bundle:""`
Tty bool `compose:"tty" bundle:""`
MemLimit yaml.MemStringorInt `compose:"mem_limit" bundle:""`
TmpFs []string `compose:"tmpfs" bundle:""`
Dockerfile string `compose:"dockerfile" bundle:""`
}
// EnvVar holds the environment variable struct of a container