cidr

package
v0.19.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const ClusterInfoKey = "clusterinfo"

Variables

This section is empty.

Functions

func AddClusterInfoData

func AddClusterInfoData(toConfigMap *corev1.ConfigMap, newCluster ClusterInfo) error

func Allocate

func Allocate(info *Info) (string, error)

func CheckForOverlappingCIDRs

func CheckForOverlappingCIDRs(infoMap map[string]*ClusterInfo, cidr, clusterID string) error

func ExtractClusterInfo

func ExtractClusterInfo(fromConfigMap *corev1.ConfigMap) (map[string]*ClusterInfo, error)

func GetValidAllocationSize

func GetValidAllocationSize(cidrRange string, allocationSize uint) (uint, error)

func IsCIDRPreConfigured

func IsCIDRPreConfigured(clusterID string, clustersetIPNetworks map[string]*ClusterInfo) bool

func IsValid

func IsValid(cidr string) error

Types

type ClusterInfo

type ClusterInfo struct {
	ClusterID string   `json:"cluster_id"`
	CIDRs     []string `json:"global_cidr"`
}

type Info

type Info struct {
	CIDR           string
	AllocationSize uint
	Clusters       map[string]*ClusterInfo
}

Jump to

Keyboard shortcuts

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