Documentation
¶
Index ¶
- Constants
- Variables
- type BasePluginNode
- type CalicoConfig
- type CalicoNetworkMode
- type CalicoPluginOptions
- type FlannelBackendType
- type FlannelConfig
- type FlannelPluginOptions
- type GenericNetNode
- type NetworkPolicyHandler
- type Plugin
- func NewCalicoPlugin(ctx *ctx.Context, serviceProcessor service.Processor, ...) (Plugin, error)
- func NewCalicoPluginWithOptions(ctx *ctx.Context, options *CalicoPluginOptions) (Plugin, error)
- func NewFlannelPlugin(ctx *ctx.Context, serviceProcessor service.Processor, ...) (Plugin, error)
- func NewFlannelPluginWithOptions(ctx *ctx.Context, options *FlannelPluginOptions) (Plugin, error)
- type SimplePluginNode
Constants ¶
View Source
const (
CalicoDefaultInterfacePrefix = "cali"
)
Variables ¶
View Source
var Calico = &CalicoConfig{}
View Source
var Flannel = &FlannelConfig{}
Functions ¶
This section is empty.
Types ¶
type BasePluginNode ¶
type BasePluginNode struct { *model.NetNode IPCache *k8s.IPCache SimplePluginNode SimplePluginNode }
func (*BasePluginNode) Receive ¶
func (b *BasePluginNode) Receive(upstream *model.Link) (trans []model.Transmission, err error)
func (*BasePluginNode) Send ¶
func (b *BasePluginNode) Send(dst model.Endpoint, protocol model.Protocol) (trans []model.Transmission, err error)
type CalicoConfig ¶
func (*CalicoConfig) BindFlags ¶
func (c *CalicoConfig) BindFlags(fs *pflag.FlagSet)
func (*CalicoConfig) Validate ¶
func (c *CalicoConfig) Validate() error
type CalicoNetworkMode ¶
type CalicoNetworkMode string
const ( CalicoNetworkModelBGP CalicoNetworkMode = "BGP" CalicoNetworkModeIPIP CalicoNetworkMode = "IPIP" CalicoNetworkModeVXLan CalicoNetworkMode = "VXLan" CalicoTunnelInterface = "tunl0" )
type CalicoPluginOptions ¶
type FlannelBackendType ¶
type FlannelBackendType string
const ( FlannelBackendTypeHostGW FlannelBackendType = "host-gw" FlannelBackendTypeVxlan FlannelBackendType = "vxlan" FlannelBackendTypeAlloc FlannelBackendType = "alloc" )
type FlannelConfig ¶
type FlannelConfig struct { BackendType string Bridge string PodMTU int IPMasq bool Interface string }
func (*FlannelConfig) BindFlags ¶
func (f *FlannelConfig) BindFlags(fs *pflag.FlagSet)
func (*FlannelConfig) Validate ¶
func (f *FlannelConfig) Validate() error
type FlannelPluginOptions ¶
type GenericNetNode ¶
func (*GenericNetNode) Receive ¶
func (n *GenericNetNode) Receive(upstream *model.Link) ([]model.Transmission, error)
func (*GenericNetNode) Send ¶
func (n *GenericNetNode) Send(_ model.Endpoint, _ model.Protocol) ([]model.Transmission, error)
type NetworkPolicyHandler ¶
type Plugin ¶
type Plugin interface { CreatePod(pod *k8s.Pod) (model.NetNodeAction, error) CreateNode(node *k8s.NodeInfo) (model.NetNodeAction, error) }
func NewCalicoPlugin ¶
func NewCalicoPluginWithOptions ¶
func NewCalicoPluginWithOptions(ctx *ctx.Context, options *CalicoPluginOptions) (Plugin, error)
func NewFlannelPlugin ¶
func NewFlannelPluginWithOptions ¶
func NewFlannelPluginWithOptions(ctx *ctx.Context, options *FlannelPluginOptions) (Plugin, error)
type SimplePluginNode ¶
type SimplePluginNode interface { ToPod(upstream *model.Link, dst model.Endpoint, protocol model.Protocol, pod *v1.Pod) ([]model.Transmission, error) ToHost(upstream *model.Link, dst model.Endpoint, protocol model.Protocol, node *v1.Node) ([]model.Transmission, error) ToService(upstream *model.Link, dst model.Endpoint, protocol model.Protocol, service *v1.Service) ([]model.Transmission, error) ToExternal(upstream *model.Link, dst model.Endpoint, protocol model.Protocol) ([]model.Transmission, error) Serve(upstream *model.Link, dst model.Endpoint, protocol model.Protocol) ([]model.Transmission, error) }
Click to show internal directories.
Click to hide internal directories.