flannel

package
v0.0.99 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: GPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlannelBaseAnnotation         = "flannel.alpha.coreos.com"
	FlannelExternalIPv4Annotation = FlannelBaseAnnotation + "/public-ip-overwrite"
	FlannelExternalIPv6Annotation = FlannelBaseAnnotation + "/public-ipv6-overwrite"
)

Functions

func LookupExtInterface

func LookupExtInterface(iface *net.Interface, netMode int) (*backend.ExternalInterface, error)

func ReadCIDRFromSubnetFile

func ReadCIDRFromSubnetFile(path string, CIDRKey string) ip.IP4Net

ReadCIDRFromSubnetFile reads the flannel subnet file and extracts the value of IPv4 network CIDRKey

func ReadCIDRsFromSubnetFile

func ReadCIDRsFromSubnetFile(path string, CIDRKey string) []ip.IP4Net

func ReadIP6CIDRFromSubnetFile

func ReadIP6CIDRFromSubnetFile(path string, CIDRKey string) ip.IP6Net

ReadIP6CIDRFromSubnetFile reads the flannel subnet file and extracts the value of IPv6 network CIDRKey

func ReadIP6CIDRsFromSubnetFile

func ReadIP6CIDRsFromSubnetFile(path string, CIDRKey string) []ip.IP6Net

func Run

func Run(ctx context.Context, smrCtx *smrContext.Context, config *configuration.Configuration, agent string) error

func WriteSubnetFile

func WriteSubnetFile(path string, nw ip.IP4Net, nwv6 ip.IP6Net, ipMasq bool, bn backend.Network, netMode int) error

Types

type Flannel added in v0.0.90

type Flannel struct {
	Backend           string
	FlannelConfigPath string

	Interface          *backend.ExternalInterface
	InterfaceSpecified *net.Interface
	CIDR               []*net.IPNet
	NetMode            int
	Network            ip.IP4Net
	V6Network          ip.IP6Net

	IPv4Enabled bool
	IPv6Enabled bool
	IPv6Masq    bool
}

func New added in v0.0.90

func New(path string) *Flannel

func (*Flannel) Clear added in v0.0.90

func (f *Flannel) Clear() error

func (*Flannel) EnableIPv4 added in v0.0.90

func (f *Flannel) EnableIPv4(enable bool) error

func (*Flannel) EnableIPv6 added in v0.0.90

func (f *Flannel) EnableIPv6(enable bool) error

func (*Flannel) MaskIPv6 added in v0.0.90

func (f *Flannel) MaskIPv6(enabled bool)

func (*Flannel) SetBackend added in v0.0.90

func (f *Flannel) SetBackend(backend string) error

func (*Flannel) SetCIDR added in v0.0.90

func (f *Flannel) SetCIDR(cidr string) error

func (*Flannel) SetInterface added in v0.0.90

func (f *Flannel) SetInterface(name string) error

type Subnet

type Subnet struct {
	PublicIP    string `json:"PublicIP"`
	PublicIPv6  string `json:"PublicIPv6"`
	BackendType string `json:"BackendType"`
	BackendData struct {
		VNI     int    `json:"VNI"`
		VtepMAC string `json:"VtepMAC"`
	} `json:"BackendData"`
}

Jump to

Keyboard shortcuts

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