feat: add port type support
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
Marc 2024-09-27 00:03:20 -04:00
parent b5408fda1a
commit a11bbe2eec
Signed by: marc
GPG key ID: 048E042F22B5DC79

View file

@ -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...)
} }