flannel

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-3.0 Imports: 36 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 Definition added in v0.1.56

func Definition(subnetCIDR string) *v1.NetworkDefinition

func LookupExtInterface added in v0.1.56

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

func ReadCIDRFromSubnetFile added in v0.1.56

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

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

func ReadCIDRsFromSubnetFile added in v0.1.56

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

func ReadIP6CIDRFromSubnetFile added in v0.1.56

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

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

func ReadIP6CIDRsFromSubnetFile added in v0.1.56

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

func Run added in v0.1.56

func Setup

func Setup(ctx context.Context, client *clientv3.Client, network string, backend string) error

func WriteSubnetFile added in v0.1.56

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

Types

type Flannel added in v0.1.56

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.1.56

func New(path string) *Flannel

func (*Flannel) Clear added in v0.1.56

func (f *Flannel) Clear() error

func (*Flannel) EnableIPv4 added in v0.1.56

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

func (*Flannel) EnableIPv6 added in v0.1.56

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

func (*Flannel) MaskIPv6 added in v0.1.56

func (f *Flannel) MaskIPv6(enabled bool)

func (*Flannel) SetBackend added in v0.1.56

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

func (*Flannel) SetCIDR added in v0.1.56

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

func (*Flannel) SetInterface added in v0.1.56

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

type Subnet added in v0.1.56

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