types

package
v0.0.0-...-f4fb339 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Args

type Args struct{}

Args contains arbitrary information a scheduler can pass to the cni plugin

type ArgsSpec

type ArgsSpec struct {
	cniTypes.CommonArgs
	IP                         net.IP
	K8S_POD_NAME               cniTypes.UnmarshallableString
	K8S_POD_NAMESPACE          cniTypes.UnmarshallableString
	K8S_POD_INFRA_CONTAINER_ID cniTypes.UnmarshallableString
}

ArgsSpec is the specification of additional arguments of the CNI ADD call

type IPAM

type IPAM struct {
	cniTypes.IPAM
	ipamTypes.IPAMSpec
	ENI         *api.ENISpec      `json:"eni"`
	Routes      []*cniTypes.Route `json:"routes"`
	EnableDebug bool              `json:"enable-debug"`
	LogFormat   string            `json:"log-format"`
	LogFile     string            `json:"log-file"`

	// for private cloud base
	// use host as gateway
	HostLink       string `json:"hostLink"`
	UseHostGateWay bool   `json:"use-host-gate-way"`
}

IPAM is the CCE specific CNI IPAM configuration

type NetConf

type NetConf struct {
	cniTypes.NetConf
	MTU  int  `json:"mtu"`
	Args Args `json:"args"`
	IPAM IPAM `json:"ipam,omitempty"` // Shadows the JSON field "ipam" in cniTypes.NetConf.
}

NetConf is the CCE specific CNI network configuration

func LoadNetConf

func LoadNetConf(bytes []byte) (*NetConf, error)

LoadNetConf unmarshals a CCE network configuration from JSON and returns a NetConf together with the CNI version

func ReadNetConf

func ReadNetConf(path string) (*NetConf, error)

ReadNetConf reads a CNI configuration file and returns the corresponding NetConf structure

func ReadRdmaNetConf

func ReadRdmaNetConf(path string) (*NetConf, error)

ReadRdmaNetConf reads a RDMA CNI configuration file and returns the corresponding RDMA NetConf structure

type NetConfList

type NetConfList struct {
	Plugins []*NetConf `json:"plugins,omitempty"`
}

NetConfList is a CNI chaining configuration

Jump to

Keyboard shortcuts

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