"Fossies" - the Fresh Open Source Software Archive

Member "cri-o-1.25.1/internal/hostport/README.md" (7 Oct 2022, 1187 Bytes) of package /linux/misc/cri-o-1.25.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "README.md": 1.24.2_vs_1.25.0.

CRI-O logo

Host Port Manager

The Host Port Managers maps ports from the Host to the specified Container Port. It can also specify the Host IP that should be mapped to the container IP. For security reasons, it also opens a socket in the host to avoid any process in the system that could interfere with the traffic that is being port mapped.

hostport

This code is copied from the kubernetes/kubernetes repo https://github.com/kubernetes/kubernetes/tree/41533ecec8966636554faba44368a36d5d6c5347/pkg/kubelet/dockershim/network/hostport. Since Kubernetes started the deprecation of that part of the code in https://github.com/kubernetes/kubernetes/pull/94624, it is missing some fixes and the features required to operate correctly in dual stack environments.

The kubernetes/kubernetes repo has a fix where the host port manager always opens a socket in all addresses, instead of leveraging the HostIP field: https://github.com/kubernetes/kubernetes/pull/94382

The current implementation only maps ports for the first IP of each IP family obtained from the CNI results.