Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sanitize port parsing for pods in play kube
The logic used in parsing the ports to be utilized in a kubenetes api defined pod did not fully adhere to the kubenetes spec, nor did it map well to a podman context. This fix sanitizes the input of container ports to meet the following rules: - A defined containerPort with no defined hostPort does nothing in a podman context, or is informational. This is line with [usage in Kubernetes.](kubernetes/kubernetes#4332) - A defined hostPort with no defined containerPort acts like a publish [hostPort]:[hostPort] - A defined containerPort and defined hostPort works like it does in kubernetes, as in a publish [hostPort]:[containerPort] Addresses containers#5610 Signed-off-by: Tyler Ramer <[email protected]>
- Loading branch information