Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdAddK8s ¶
func CmdAddK8s(ctx context.Context, args *skel.CmdArgs, conf types.NetConf, epIDs utils.WEPIdentifiers, calicoClient calicoclient.Interface, endpoint *api.WorkloadEndpoint) (*current.Result, error)
CmdAddK8s performs the "ADD" operation on a kubernetes pod Having kubernetes code in its own file avoids polluting the mainline code. It's expected that the kubernetes case will more special casing than the mainline code.
func CmdDelK8s ¶ added in v1.7.0
func CmdDelK8s(ctx context.Context, c calicoclient.Interface, epIDs utils.WEPIdentifiers, args *skel.CmdArgs, conf types.NetConf, logger *logrus.Entry) error
CmdDelK8s performs the "DEL" operation on a kubernetes pod. The following logic only applies to kubernetes since it sends multiple DELs for the same endpoint. See: https://github.com/kubernetes/kubernetes/issues/44100 We store CNI_CONTAINERID as ActiveInstanceID in WEP Metadata for k8s, so in this function we need to get the WEP and make sure we check if ContainerID and ActiveInstanceID are the same before deleting the pod being deleted.
Types ¶
This section is empty.