types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Address string `json:"address"`
	Gateway net.IP `json:"gateway,omitempty"`
	Version string
}

type FlatNetworkConfig

type FlatNetworkConfig struct {
	MTU         int    `json:"mtu"`
	ClusterCIDR string `json:"clusterCIDR"`
	ServiceCIDR string `json:"serviceCIDR"`
	ARPPolicy   string `json:"arpPolicy"`
	ProxyARP    bool   `json:"proxyARP"`
}

type IPAMConfig

type IPAMConfig struct {
	Type      string         `json:"type"`
	Addresses []Address      `json:"addresses,omitempty"`
	Routes    []*types.Route `json:"routes,omitempty"`
}

type K8sArgs

type K8sArgs struct {
	types.CommonArgs

	// IP is pod's ip address
	IP net.IP

	// K8S_POD_NAME is pod's name
	K8S_POD_NAME types.UnmarshallableString

	// K8S_POD_NAMESPACE is pod's namespace
	K8S_POD_NAMESPACE types.UnmarshallableString

	// K8S_POD_INFRA_CONTAINER_ID is pod's container id
	K8S_POD_INFRA_CONTAINER_ID types.UnmarshallableString
}

K8sArgs is the valid CNI_ARGS used for Kubernetes

type NetConf

type NetConf struct {
	CNIVersion string `json:"cniVersion,omitempty"`

	Name         string          `json:"name,omitempty"`
	Type         string          `json:"type,omitempty"`
	Capabilities map[string]bool `json:"capabilities,omitempty"`
	DNS          types.DNS       `json:"dns,omitempty"`

	RawPrevResult map[string]interface{} `json:"prevResult,omitempty"`
	PrevResult    types.Result           `json:"-"`

	// ValidAttachments is only supplied when executing a GC operation
	ValidAttachments []types.GCAttachment `json:"cni.dev/valid-attachments,omitempty"`

	// static-ipam config
	IPAM IPAMConfig `json:"ipam,omitempty"`

	// Rancher FlatNetwork Config
	FlatNetworkConfig FlatNetworkConfig `json:"flatNetwork,omitempty"`
}

NetConf describes a network.

Jump to

Keyboard shortcuts

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