globalnet

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 14 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(ctx context.Context, brokerAdminClient controllerClient.Client, 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(ctx context.Context, client controllerClient.Client, globalnetEnabled bool, defaultGlobalCidrRange string,
	defaultGlobalClusterSize uint, namespace string,
) error

func DeleteConfigMap added in v0.13.0

func DeleteConfigMap(ctx context.Context, client controllerClient.Client, namespace string) error

func GetConfigMap added in v0.13.0

func GetConfigMap(ctx context.Context, client controllerClient.Client, namespace string) (*corev1.ConfigMap, error)

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,
) (*corev1.ConfigMap, error)

func ValidateExistingGlobalNetworks added in v0.10.1

func ValidateExistingGlobalNetworks(ctx context.Context, client controllerClient.Client, 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(ctx context.Context, client controllerClient.Client, brokerNamespace string) (*Info, *v1.ConfigMap, error)

Jump to

Keyboard shortcuts

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