meta

package
v0.35.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CheckVLANRangesOverlap

func CheckVLANRangesOverlap(ranges []VLANRange) error

func DefaultObjectMetadata

func DefaultObjectMetadata(obj client.Object)

func SortVLANRanges

func SortVLANRanges(ranges []VLANRange)

func ValidateObjectMetadata

func ValidateObjectMetadata(obj client.Object) error

Types

type DHCPMode

type DHCPMode string
const (
	DHCPModeISC      DHCPMode = "isc"
	DHCPModeHedgehog DHCPMode = "hedgehog"
)

func (DHCPMode) IsMultiNSDHCP

func (m DHCPMode) IsMultiNSDHCP() bool

type Defaultable

type Defaultable interface {
	Default()
}

type FabricConfig

type FabricConfig struct {
	ControlVIP            string      `json:"controlVIP,omitempty"`
	APIServer             string      `json:"apiServer,omitempty"`
	AgentRepo             string      `json:"agentRepo,omitempty"`
	AgentRepoCA           string      `json:"agentRepoCA,omitempty"`
	VPCIRBVLANRanges      []VLANRange `json:"vpcIRBVLANRange,omitempty"`
	VPCPeeringVLANRanges  []VLANRange `json:"vpcPeeringVLANRange,omitempty"` // TODO rename (loopback workaround)
	VPCPeeringDisabled    bool        `json:"vpcPeeringDisabled,omitempty"`
	ReservedSubnets       []string    `json:"reservedSubnets,omitempty"`
	Users                 []UserCreds `json:"users,omitempty"`
	DHCPMode              DHCPMode    `json:"dhcpMode,omitempty"`
	DHCPDConfigMap        string      `json:"dhcpdConfigMap,omitempty"`
	DHCPDConfigKey        string      `json:"dhcpdConfigKey,omitempty"`
	FabricMode            FabricMode  `json:"fabricMode,omitempty"`
	BaseVPCCommunity      string      `json:"baseVPCCommunity,omitempty"`
	VPCLoopbackSubnet     string      `json:"vpcLoopbackSubnet,omitempty"`
	FabricMTU             uint16      `json:"fabricMTU,omitempty"`
	ServerFacingMTUOffset uint16      `json:"serverFacingMTUOffset,omitempty"`
	ESLAGMACBase          string      `json:"eslagMACBase,omitempty"`
	ESLAGESIPrefix        string      `json:"eslagESIPrefix,omitempty"`
	// contains filtered or unexported fields
}

func LoadFabricConfig

func LoadFabricConfig(basedir string) (*FabricConfig, error)

func (*FabricConfig) ParsedReservedSubnets

func (cfg *FabricConfig) ParsedReservedSubnets() []*net.IPNet

type FabricMode

type FabricMode string
const (
	FabricModeCollapsedCore FabricMode = "collapsed-core"
	FabricModeSpineLeaf     FabricMode = "spine-leaf"
)

type Object

type Object interface {
	client.Object

	Defaultable
	Validatable
}

type ObjectList added in v0.34.0

type ObjectList interface {
	client.ObjectList

	GetItems() []Object
}

type Range

type Range[T comparable] interface {
	From() T
	To() T
}

type RedundancyType

type RedundancyType string

+kubebuilder:validation:Enum=mclag;eslag RedundancyType is the type of the redundancy group, could be mclag or eslag. It defines how redundancy will be configured and handled on the switch as well as which connection types will be available.

const (
	RedundancyTypeNone  RedundancyType = ""
	RedundancyTypeMCLAG RedundancyType = "mclag"
	RedundancyTypeESLAG RedundancyType = "eslag"
)

type UserCreds

type UserCreds struct {
	Name     string   `json:"name,omitempty"`
	Password string   `json:"password,omitempty"`
	Role     string   `json:"role,omitempty"`
	SSHKeys  []string `json:"sshKeys,omitempty"`
}

type VLANRange

type VLANRange struct {
	From uint16 `json:"from,omitempty"`
	To   uint16 `json:"to,omitempty"`
}

func NormalizedVLANRanges

func NormalizedVLANRanges(ranges []VLANRange) ([]VLANRange, error)

type Validatable

type Validatable interface {
	Validate(ctx context.Context, kube client.Reader, fabricCfg *FabricConfig) (admission.Warnings, error)
}

Jump to

Keyboard shortcuts

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