danmep

package
v4.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2021 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetryCount = 10
	RetryInterval = 100
)
View Source
const (
	InvalidMacAddress = "00:00:00:00:00:00"
)

Variables

This section is empty.

Functions

func AddIpvlanInterface

func AddIpvlanInterface(dnet *danmtypes.DanmNet, ep *danmtypes.DanmEp) error

func ArePodsConnectedToNetwork

func ArePodsConnectedToNetwork(client danmclientset.Interface, dnet *danmtypes.DanmNet) (bool, danmtypes.DanmEp, error)

ArePodsConnectedToNetwork checks if there are any Pods currently in the system using the particular network. If there is at least, it returns true, and the spec of the first matching DanmEp.

func CidsByHost

func CidsByHost(client danmclientset.Interface, host string) (map[string]danmtypes.DanmEp, error)

CidsByHost returns a map of Eps The Eps in the map are indexed with the name of the K8s host their Pods are running on

func CreateDanmEp

func CreateDanmEp(danmClient danmclientset.Interface, namingScheme string, isIpReservationNeeded bool, netInfo *danmtypes.DanmNet, iface datastructs.Interface, args *datastructs.CniArgs) (*danmtypes.DanmEp, *danmtypes.DanmNet, error)

CreateDanmEp is a RAII-like API to automatically reserve IP allocations whenever an object holding these allocations is created It helps making sure IPs are for sure universally reserved upon DanmEp creation itself TODO: I hate myself for the bool input parameter, but ipam absolutely should not depend on cnidel. Could be changed to cleverly defaulting iface attributes to sthing?

func DeleteDanmEp

func DeleteDanmEp(danmClient danmclientset.Interface, ep *danmtypes.DanmEp, dnet *danmtypes.DanmNet) error

DeleteDanmEp is a RAII-like API to automatically free IP allocations whenever the resource holding these allocations is deleted It helps making sure IPs are always and only freed when a DanmEp is indeed deleted

func DeleteIpvlanInterface

func DeleteIpvlanInterface(ep *danmtypes.DanmEp) error

DeleteIpvlanInterface deletes a Pod's IPVLAN network interface based on the related DanmEp

func DetermineHostDeviceName

func DetermineHostDeviceName(dnet *danmtypes.DanmNet) string

func FindByCid

func FindByCid(client danmclientset.Interface, cid string) ([]danmtypes.DanmEp, error)

FindByCid returns a map of DanmEps which belongs to the same infra container ID

func FindByPodName

func FindByPodName(client danmclientset.Interface, podName, ns string) ([]danmtypes.DanmEp, error)

FindByPodName returns a map of DanmEps which belong to the same Pod in a given namespace If no Pod name is provided, function returns no DanmEps

func FindByPodUid

func FindByPodUid(client danmclientset.Interface, podUid, ns string) ([]danmtypes.DanmEp, error)

FindByPodUid returns a map of DanmEps which belong to the same Pod instance in a given namespace If no Pod name is provided, function returns no DanmEps

func PostProcessInterface

func PostProcessInterface(ep *danmtypes.DanmEp, dnet *danmtypes.DanmNet) error

func UpdateDanmEp

func UpdateDanmEp(client danmclientset.Interface, ep *danmtypes.DanmEp) error

UpdateDanmEp is a more network outage resilient version of the one provided by the base K8s client

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL