Documentation ¶
Index ¶
- Constants
- func AddIpvlanInterface(dnet *danmtypes.DanmNet, ep *danmtypes.DanmEp) error
- func ArePodsConnectedToNetwork(client danmclientset.Interface, dnet *danmtypes.DanmNet) (bool, danmtypes.DanmEp, error)
- func CidsByHost(client danmclientset.Interface, host string) (map[string]danmtypes.DanmEp, error)
- func CreateDanmEp(danmClient danmclientset.Interface, namingScheme string, ...) (*danmtypes.DanmEp, *danmtypes.DanmNet, error)
- func DeleteDanmEp(danmClient danmclientset.Interface, ep *danmtypes.DanmEp, ...) error
- func DeleteIpvlanInterface(ep *danmtypes.DanmEp) error
- func DetermineHostDeviceName(dnet *danmtypes.DanmNet) string
- func FindByCid(client danmclientset.Interface, cid string) ([]danmtypes.DanmEp, error)
- func FindByPodName(client danmclientset.Interface, podName, ns string) ([]danmtypes.DanmEp, error)
- func FindByPodUid(client danmclientset.Interface, podUid, ns string) ([]danmtypes.DanmEp, error)
- func PostProcessInterface(ep *danmtypes.DanmEp, dnet *danmtypes.DanmNet) error
- func UpdateDanmEp(client danmclientset.Interface, ep *danmtypes.DanmEp) error
Constants ¶
const ( MaxRetryCount = 10 RetryInterval = 100 )
const (
InvalidMacAddress = "00:00:00:00:00:00"
)
Variables ¶
This section is empty.
Functions ¶
func AddIpvlanInterface ¶
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 ¶
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 ¶
DeleteIpvlanInterface deletes a Pod's IPVLAN network interface based on the related DanmEp
func DetermineHostDeviceName ¶
func FindByPodName ¶
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 ¶
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 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.