Documentation
¶
Index ¶
- Constants
- func AciNameForKey(prefix, ktype, key string) string
- func CombineVlanPoolMaps(nsVlanPoolMap map[string]map[string]string, namespace string) (combinedStr string)
- func CreateHashFromNetPol(np *v1net.NetworkPolicy) (string, error)
- func CreateRdConfigCR(r rdconfigclset.Clientset, rdConfigSpec rdConfig.RdConfigSpec) error
- func CreateSnatGlobalInfoCR(c snatglobalclset.Clientset, globalInfoSpec snatglobal.SnatGlobalInfoSpec) error
- func DeepCopyObj(src, dst interface{}) error
- func DeleteNodeInfoCR(c nodeinfoclset.Clientset, name string) error
- func DeleteNodePodIfCR(c nc.Clientset, name string) error
- func ExpandCIDRs(currCIDRs []string) []string
- func ExpandPortRanges(currPortRange []snatglobal.PortRange, step int) []snatglobal.PortRange
- func GetGlobalInfoCR(c snatglobalclset.Clientset) (snatglobal.SnatGlobalInfo, error)
- func GetIPsFromCIDR(cidr string) []string
- func GetNetPolPolicyTypes(indexer cache.Indexer, key string) []v1net.PolicyType
- func GetPortRangeFromConfigMap(c *kubernetes.Clientset) (snatglobal.PortRange, int)
- func Hash(key string) string
- func IsEndPointSlicesSupported(kubeClient *kubernetes.Clientset) bool
- func MatchLabels(policylabels, reslabels map[string]string) bool
- func ParseVlanList(specVlans []string) (vlans []int, vlanBlks []string, combinedStr string, err error)
- func ParseVlanListWithRangePreserved(specVlans []string) (vlans []int, vlanBlks []string, combinedStr string, err error)
- func UpdateGlobalInfoCR(c snatglobalclset.Clientset, globalInfo *snatglobal.SnatGlobalInfo) error
- func UpdateSnatPolicyCR(c snatpolicyclset.Clientset, policy *snatpolicy.SnatPolicy) error
- type EncapMode
- type StartSorter
Constants ¶
const MAX_PORT = 65000
const MIN_PORT = 5000
const PORTPERNODES = 3000
Variables ¶
This section is empty.
Functions ¶
func AciNameForKey ¶
AciNameForKey generates an ACI object name based on the params passed
func CombineVlanPoolMaps ¶
func CreateHashFromNetPol ¶
func CreateHashFromNetPol(np *v1net.NetworkPolicy) (string, error)
func CreateRdConfigCR ¶
func CreateRdConfigCR(r rdconfigclset.Clientset, rdConfigSpec rdConfig.RdConfigSpec) error
CreateRdConfigCR creates a RdConfig CR
func CreateSnatGlobalInfoCR ¶
func CreateSnatGlobalInfoCR(c snatglobalclset.Clientset, globalInfoSpec snatglobal.SnatGlobalInfoSpec) error
createSnatGlobalInfoCR Creates a SnatGlobalInfo CR
func DeepCopyObj ¶
func DeepCopyObj(src, dst interface{}) error
func DeleteNodeInfoCR ¶
func DeleteNodeInfoCR(c nodeinfoclset.Clientset, name string) error
UpdateNodeInfoCR Updates a UpdateNodeInfoInfo CR
func DeleteNodePodIfCR ¶
DeleteNodePodIfCR Deletes a NodePodIf CR
func ExpandCIDRs ¶
Given generic list of CIDRs for subnets return sorted array(based on IP address) of IP addresses.
func ExpandPortRanges ¶
func ExpandPortRanges(currPortRange []snatglobal.PortRange, step int) []snatglobal.PortRange
Given generic list of start and end of each port range, return sorted array(based on start of the range) of portranges based on number of per node
func GetGlobalInfoCR ¶
func GetGlobalInfoCR(c snatglobalclset.Clientset) (snatglobal.SnatGlobalInfo, error)
func GetIPsFromCIDR ¶
Given CIDR, this function returns list of IP addresses in that CIDR It does omit network and host reserved IP address from that.
func GetNetPolPolicyTypes ¶
func GetNetPolPolicyTypes(indexer cache.Indexer, key string) []v1net.PolicyType
func GetPortRangeFromConfigMap ¶
func GetPortRangeFromConfigMap(c *kubernetes.Clientset) (snatglobal.PortRange, int)
func IsEndPointSlicesSupported ¶
func IsEndPointSlicesSupported(kubeClient *kubernetes.Clientset) bool
Checks if cluster supports endpointslices
func MatchLabels ¶
func ParseVlanList ¶
func UpdateGlobalInfoCR ¶
func UpdateGlobalInfoCR(c snatglobalclset.Clientset, globalInfo *snatglobal.SnatGlobalInfo) error
UpdateSnatGlobalInfoCR Updates a SnatGlobalInfo CR
func UpdateSnatPolicyCR ¶
func UpdateSnatPolicyCR(c snatpolicyclset.Clientset, policy *snatpolicy.SnatPolicy) error
UpdateSnatPolicy Updates a UpdateSnatPolicy CR
Types ¶
type StartSorter ¶
type StartSorter []snatglobal.PortRange
func (StartSorter) Len ¶
func (a StartSorter) Len() int
func (StartSorter) Less ¶
func (a StartSorter) Less(i, j int) bool
func (StartSorter) Swap ¶
func (a StartSorter) Swap(i, j int)