globalnet

package
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 13 Imported by: 5

Documentation

Index

Constants

View Source
const (
	DefaultGlobalnetCIDR        = "242.0.0.0/8"
	DefaultGlobalnetClusterSize = 65536 // i.e., x.x.x.x/16 subnet mask
)

Variables

This section is empty.

Functions

func AllocateAndUpdateGlobalCIDRConfigMap added in v0.12.0

func AllocateAndUpdateGlobalCIDRConfigMap(brokerAdminClientset kubernetes.Interface, brokerNamespace string,
	netconfig *Config, status reporter.Interface,
) error

func AllocateGlobalCIDR added in v0.2.0

func AllocateGlobalCIDR(globalnetInfo *Info) (string, error)

func AssignGlobalnetIPs added in v0.3.1

func AssignGlobalnetIPs(globalnetInfo *Info, netconfig Config, status reporter.Interface) (string, error)

func CheckOverlappingCidrs added in v0.5.0

func CheckOverlappingCidrs(globalnetInfo *Info, netconfig Config) error

func CreateConfigMap added in v0.13.0

func CreateConfigMap(kubeClient kubernetes.Interface, globalnetEnabled bool, defaultGlobalCidrRange string,
	defaultGlobalClusterSize uint, namespace string,
) error

func DeleteConfigMap added in v0.13.0

func DeleteConfigMap(kubeClient kubernetes.Interface, namespace string) error

nolint:wrapcheck // No need to wrap here

func GetConfigMap added in v0.13.0

func GetConfigMap(kubeClient kubernetes.Interface, namespace string) (*v1.ConfigMap, error)

nolint:wrapcheck // No need to wrap here

func GetValidClusterSize added in v0.3.0

func GetValidClusterSize(cidrRange string, clusterSize uint) (uint, error)

func IsValidCIDR added in v0.10.1

func IsValidCIDR(cidr string) error

func LastIP added in v0.9.0

func LastIP(network *net.IPNet) uint

func NewGlobalnetConfigMap added in v0.13.0

func NewGlobalnetConfigMap(globalnetEnabled bool, defaultGlobalCidrRange string,
	defaultGlobalClusterSize uint, namespace string,
) (*v1.ConfigMap, error)

func ValidateExistingGlobalNetworks added in v0.10.1

func ValidateExistingGlobalNetworks(kubeClient kubernetes.Interface, namespace string) error

func ValidateGlobalnetConfiguration added in v0.3.1

func ValidateGlobalnetConfiguration(globalnetInfo *Info, netconfig Config, status reporter.Interface) (string, error)

Types

type CIDR added in v0.2.0

type CIDR struct {
	// contains filtered or unexported fields
}

func NewCIDR added in v0.2.0

func NewCIDR(cidr string) (CIDR, error)

type Config added in v0.3.1

type Config struct {
	ClusterID   string
	GlobalCIDR  string
	ClusterSize uint
}

type GlobalCIDR added in v0.2.0

type GlobalCIDR struct {
	// contains filtered or unexported fields
}

type GlobalNetwork

type GlobalNetwork struct {
	GlobalCIDRs []string
	ClusterID   string
}

type Info added in v0.12.0

type Info struct {
	Enabled     bool
	CidrRange   string
	ClusterSize uint
	CidrInfo    map[string]*GlobalNetwork
}

func GetGlobalNetworks added in v0.3.1

func GetGlobalNetworks(kubeClient kubernetes.Interface, brokerNamespace string) (*Info, *v1.ConfigMap, error)

Jump to

Keyboard shortcuts

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