This commit is contained in:
parent
b5408fda1a
commit
a11bbe2eec
1 changed files with 6 additions and 1 deletions
|
@ -41,7 +41,12 @@ func CreatePod(name string, ports []service_definition.PortMapping) error {
|
||||||
args := []string{"pod", "create", "--replace"}
|
args := []string{"pod", "create", "--replace"}
|
||||||
|
|
||||||
for _, portMapping := range ports {
|
for _, portMapping := range ports {
|
||||||
portArgs := []string{"-p", portMapping.Host + ":" + portMapping.Container}
|
portMapStr := portMapping.Host + ":" + portMapping.Container
|
||||||
|
|
||||||
|
if portMapping.Type != "" {
|
||||||
|
portMapStr = portMapStr + "/" + portMapping.Type
|
||||||
|
}
|
||||||
|
portArgs := []string{"-p", portMapStr}
|
||||||
args = append(args, portArgs...)
|
args = append(args, portArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue