clustersetip

package
v0.20.0-m2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultCIDR           = "243.0.0.0/8"
	DefaultAllocationSize = 4096 // i.e., x.x.x.x/20 subnet mask
)

Variables

This section is empty.

Functions

func AllocateCIDRFromConfigMap

func AllocateCIDRFromConfigMap(ctx context.Context, brokerAdminClient controllerClient.Client, brokerNamespace string,
	config *Config, status reporter.Interface,
) (bool, error)

func AllocateClustersetIPCIDR

func AllocateClustersetIPCIDR(clustersetIPInfo *Info) (string, error)

func CreateConfigMap

func CreateConfigMap(ctx context.Context, client controllerClient.Client, clustersetIPEnabled bool,
	defaultClustersetIPCidrRange string, defaultClustersetIPClusterSize uint, namespace string,
) error

func DeleteConfigMap

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

func GetConfigMap

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

func NewClustersetIPConfigMap

func NewClustersetIPConfigMap(clustersetIPEnabled bool, defaultClusteretIPCidrRange string,
	defaultClustersetIPClusterSize uint, namespace string,
) (*corev1.ConfigMap, error)

func ValidateClustersetIPConfiguration

func ValidateClustersetIPConfiguration(clustersetIPInfo *Info, netconfig Config, status reporter.Interface) (string, error)

func ValidateExistingClustersetIPNetworks

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

Types

type Config

type Config struct {
	ClusterID        string
	ClustersetIPCIDR string
	AllocationSize   uint
}

type Info

type Info struct {
	Enabled bool
	cidr.Info
}

func GetClustersetIPNetworks

func GetClustersetIPNetworks(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