Documentation ¶
Index ¶
Constants ¶
View Source
const ( FSTypeCgroup2 = "cgroup2" FSTypeBPF = "bpf" )
View Source
const LocalPodIPSPinnedMapPathRelativeToBPFFS = "/local_pod_ips"
LocalPodIPSPinnedMapPathRelativeToBPFFS is a path where the local_pod_ips map is pinned, it's hardcoded as "{BPFFS_path}/tc/globals/local_pod_ips" because merbridge is hard-coding it as well, and we don't want to allot to change it by mistake
View Source
const MaxItemLen = 10
MaxItemLen is the maximal amount of items like ports or IP ranges to include or/and exclude. It's currently hardcoded to 10 as merbridge during creation of this map is assigning hardcoded 244 bytes for map values:
Cidr: 8 bytes Cidr.Net: 4 bytes Cidr.Mask: 1 byte pad: 3 bytes PodConfig: 244 bytes PodConfig.StatusPort: 2 bytes pad: 2 bytes PodConfig.ExcludeOutRanges (10x Cidr): 80 bytes PodConfig.IncludeOutRanges (10x Cidr): 80 bytes PodConfig.IncludeInPorts (10x 2 bytes): 20 bytes PodConfig.IncludeOutPorts (10x 2 bytes): 20 bytes PodConfig.ExcludeInPorts (10x 2 bytes): 20 bytes PodConfig.ExcludeOutPorts (10x 2 bytes): 20 bytes
todo (bartsmykla): merbridge flagged this constant to be changed, so if
it will be changed, we have to update it
View Source
const NetNSPodIPSPinnedMapPathRelativeToBPFFS = "/netns_pod_ips"
Variables ¶
This section is empty.
Functions ¶
func GetFileInode ¶ added in v0.7.0
Types ¶
type FlagGenerator ¶ added in v0.7.1
type PodConfig ¶
type PodConfig struct { StatusPort uint16 ExcludeOutRanges [MaxItemLen]Cidr IncludeOutRanges [MaxItemLen]Cidr IncludeInPorts [MaxItemLen]uint16 IncludeOutPorts [MaxItemLen]uint16 ExcludeInPorts [MaxItemLen]uint16 ExcludeOutPorts [MaxItemLen]uint16 // contains filtered or unexported fields }
type Program ¶
type Program struct { Name string Flags FlagGenerator }
func (Program) LoadAndAttach ¶ added in v0.7.1
Click to show internal directories.
Click to hide internal directories.