meta

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 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 AlloyBasicAuth added in v0.35.5

type AlloyBasicAuth struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

type AlloyConfig added in v0.35.5

type AlloyConfig struct {
	AgentScrapeIntervalSeconds uint                             `json:"agentScrapeIntervalSeconds,omitempty"`
	UnixExporterEnabled        bool                             `json:"unixExporterEnabled,omitempty"`
	UnixExporterCollectors     []string                         `json:"unixExporterCollectors,omitempty"`
	UnixScrapeIntervalSeconds  uint                             `json:"unixScrapeIntervalSeconds,omitempty"`
	PrometheusTargets          map[string]AlloyPrometheusTarget `json:"prometheusTargets,omitempty"`
	LokiTargets                map[string]AlloyLokiTarget       `json:"lokiTargets,omitempty"`
	ControlProxyURL            string                           `json:"controlProxyURL,omitempty"`
}

+kubebuilder:object:generate=true

func (*AlloyConfig) DeepCopy added in v0.35.5

func (in *AlloyConfig) DeepCopy() *AlloyConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlloyConfig.

func (*AlloyConfig) DeepCopyInto added in v0.35.5

func (in *AlloyConfig) DeepCopyInto(out *AlloyConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlloyConfig) Default added in v0.35.5

func (a *AlloyConfig) Default()

func (*AlloyConfig) Validate added in v0.35.5

func (a *AlloyConfig) Validate() error

type AlloyLokiTarget added in v0.35.5

type AlloyLokiTarget struct {
	AlloyTarget `json:",inline"`
}

+kubebuilder:object:generate=true

func (*AlloyLokiTarget) DeepCopy added in v0.35.5

func (in *AlloyLokiTarget) DeepCopy() *AlloyLokiTarget

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlloyLokiTarget.

func (*AlloyLokiTarget) DeepCopyInto added in v0.35.5

func (in *AlloyLokiTarget) DeepCopyInto(out *AlloyLokiTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AlloyPrometheusTarget added in v0.35.5

type AlloyPrometheusTarget struct {
	AlloyTarget         `json:",inline"`
	SendIntervalSeconds uint `json:"sendIntervalSeconds,omitempty"`
}

+kubebuilder:object:generate=true

func (*AlloyPrometheusTarget) DeepCopy added in v0.35.5

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlloyPrometheusTarget.

func (*AlloyPrometheusTarget) DeepCopyInto added in v0.35.5

func (in *AlloyPrometheusTarget) DeepCopyInto(out *AlloyPrometheusTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AlloyTarget added in v0.35.5

type AlloyTarget struct {
	URL                string            `json:"url,omitempty"`
	BasicAuth          AlloyBasicAuth    `json:"basicAuth,omitempty"`
	BearerToken        string            `json:"bearerToken,omitempty"`
	Labels             map[string]string `json:"labels,omitempty"`
	UseControlProxy    bool              `json:"useControlProxy,omitempty"`
	InsecureSkipVerify bool              `json:"insecureSkipVerify,omitempty"`
	CAPEM              string            `json:"caPEM,omitempty"`
	CertPEM            string            `json:"certPEM,omitempty"`
}

+kubebuilder:object:generate=true

func (*AlloyTarget) DeepCopy added in v0.35.5

func (in *AlloyTarget) DeepCopy() *AlloyTarget

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlloyTarget.

func (*AlloyTarget) DeepCopyInto added in v0.35.5

func (in *AlloyTarget) DeepCopyInto(out *AlloyTarget)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

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"`
	AlloyRepo             string      `json:"alloyRepo,omitempty"`
	AlloyVersion          string      `json:"alloyVersion,omitempty"`
	Alloy                 AlloyConfig `json:"alloy,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