backend

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// system defined common
	//KuidOwnerGroupKey     = "be.kuid.dev/owner-group"
	//KuidOwnerVersionKey   = "be.kuid.dev/owner-version"
	//KuidOwnerNameKey      = "be.kuid.dev/owner-name"
	//KuidOwnerNamespaceKey = "be.kuid.dev/owner-namespace"
	KuidOwnerKindKey = "be.kuid.dev/owner-kind" // we need to track this to ensure a claim from an index is distinguished from a regular claim
	KuidClaimNameKey = "be.kuid.dev/claim-name"
	KuidClaimUIDKey  = "be.kuid.dev/claim-uid"
	KuidClaimTypeKey = "be.kuid.dev/claim-type"
	// system defined ipam
	KuidIPAMIPPrefixTypeKey     = "ipam.be.kuid.dev/ipprefix-type"
	KuidIPAMClaimSummaryTypeKey = "ipam.be.kuid.dev/claim-summary-type" // used for easy lookup
	KuidIPAMddressFamilyKey     = "ipam.be.kuid.dev/address-family"
	KuidIPAMSubnetKey           = "ipam.be.kuid.dev/subnet" // this is the subnet in prefix annotation used for GW selection
	KuidIPAMDefaultGatewayKey   = "ipam.be.kuid.dev/default-gateway"

	// DNS used keys
	KuidINVNetworkKey  = "inv.kuid.dev/network"
	KuidINVEndpointKey = "inv.kuid.dev/endpoint-name"
	KuidINVHeadlessKey = "inv.kuid.dev/headless-name"
	KuidINVAliasKey    = "inv.kuid.dev/alias-name"
	KuidINVPortNS      = "port.kuid.dev"
	// Inventory
	KuidINVRegionKey           = "infra.be.kuid.dev/region"
	KuidINVAvailabilityZoneKey = "infra.be.kuid.dev/availability-zone"
	KuidINVSiteKey             = "infra.be.kuid.dev/site"
	KuidINVLocationKey         = "infra.be.kuid.dev/location"
	KuidINVRackKey             = "infra.be.kuid.dev/rack"
	KuidINVPositionKey         = "infra.be.kuid.dev/position" // position in the rack
	KuidINVNodeTypeKey         = "infra.be.kuid.dev/node-type"
	KuidINVNodeKey             = "infra.be.kuid.dev/node"
	KuidINVLinkKey             = "infra.be.kuid.dev/link"
	KuidINVLinkTypeKey         = "infra.be.kuid.dev/link-type"
	KuidINVPurpose             = "infra.be.kuid.dev/purpose"
	KuidINVExclude             = "infra.be.kuid.dev/exclude"
	// Network Inventory
	KuidINVNetworkDeviceType   = "network.infra.be.kuid.dev/device-type"     // edge, core or maybe p and pe
	KuidINVNetworkLinkBFD      = "link.network.infra.be.kuid.dev/bfd"        // enable or disable true or false
	KuidINVNetworkLinkBFDMinTX = "link.network.infra.be.kuid.dev/bfd-min-tx" //
	KuidINVNetworkLinkBFDMinRX = "link.network.infra.be.kuid.dev/bfd-min-rx" //
)
View Source
const (
	IndexReservedMinName = "rangeReservedMin"
	IndexReservedMaxName = "rangeReservedMax"
)

Variables

BackendIPAMSystemKeys defined the system IPAM keys used internally in the cache for faster label based lookups Used to filter the system keys from the information presented to the outside world when generating the IP Entry object

BackendSystemKeys defined the system keys used internally in the cache for faster label based lookups. Used to filter the system keys from the information presented to the outside world when generating the XXEntry object

Functions

This section is empty.

Types

type ClaimObject

type ClaimObject interface {
	Object
	GetIndex() string
	GetSelector() *metav1.LabelSelector
	GetOwnerSelector() (labels.Selector, error)
	GetLabelSelector() (labels.Selector, error)
	GetClaimLabels() labels.Set
	ValidateOwner(labels labels.Set) error
	GetClaimType() ClaimType
	GetStaticID() *uint64
	GetStaticTreeID(t string) tree.ID
	GetClaimID(t string, id uint64) tree.ID
	GetRange() *string
	GetRangeID(t string) (tree.Range, error)
	GetTable(t string, to, from uint64) table.Table
	SetStatusRange(*string)
	SetStatusID(*uint64)
	GetStatusID() *uint64
	GetClaimRequest() string
	GetClaimResponse() string
	GetStatus() (map[string]any, error)
}

type ClaimType

type ClaimType string

+k8s:openapi-gen=true ClaimType define the type of the claim

const (
	ClaimType_Invalid   ClaimType = "invalid"
	ClaimType_StaticID  ClaimType = "staticID"
	ClaimType_DynamicID ClaimType = "dynamicID"
	ClaimType_Range     ClaimType = "range"
)

func GetClaimTypeFromString

func GetClaimTypeFromString(s string) ClaimType

type EntryObject

type EntryObject interface {
	Object
	GetIndex() string
	GetClaimType() ClaimType
	GetSpecID() string
}

type IndexObject

type IndexObject interface {
	Object
	GetTree() gtree.GTree
	GetType() string
	GetMinID() *uint64
	GetMaxID() *uint64
	GetMinClaim() ClaimObject
	GetMaxClaim() ClaimObject
	GetMax() uint64
	GetStatus() (map[string]any, error)
}

type Object

type Object interface {
	client.Object
	GetNamespacedName() types.NamespacedName
	GetKey() store.Key
	GetCondition(t condv1alpha1.ConditionType) condv1alpha1.Condition
	SetConditions(c ...condv1alpha1.Condition)
	ValidateSyntax(s string) field.ErrorList
}

Directories

Path Synopsis
as
v1alpha1
v1alpha1 is the v1alpha1 version of the API.
v1alpha1 is the v1alpha1 version of the API.
genid
v1alpha1
v1alpha1 is the v1alpha1 version of the API.
v1alpha1 is the v1alpha1 version of the API.
ipam
v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
vlan
v1alpha1
v1alpha1 is the v1alpha1 version of the API.
v1alpha1 is the v1alpha1 version of the API.

Jump to

Keyboard shortcuts

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