k8s

package
v3.8.9+incompatible Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

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

func CmdDelK8s(ctx context.Context, c calicoclient.Interface, epIDs utils.WEPIdentifiers, args *skel.CmdArgs, conf types.NetConf, logger *logrus.Entry) error

CmdDelK8s performs CNI DEL processing when running under Kubernetes. In Kubernetes, we identify workload endpoints based on their pod name and namespace rather than container ID, so we may receive multiple DEL calls for the same pod, but with different container IDs. As such, we must only delete the workload endpoint when the provided CNI_CONATAINERID matches the value on the WorkloadEndpoint. If they do not match, it means the DEL is for an old sandbox and the pod is still running. We should still clean up IPAM allocations, since they are identified by the container ID rather than the pod name and namespace. If they do match, then we can delete the workload endpoint.

Types

This section is empty.

Jump to

Keyboard shortcuts

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