nodes

package
v0.0.0-...-c7431a4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HmNamePrefix  = "amko--"
	CreatedByAMKO = "created by: amko"
	NonPathHM     = "NonPathHM"
	PathHM        = "PathHM"
)

Variables

This section is empty.

Functions

func AddUpdateGSLBHostRuleOperation

func AddUpdateGSLBHostRuleOperation(key, objType, objName string, wq *utils.WorkerQueue, agl *AviGSGraphLister)

func AddUpdateObjOperation

func AddUpdateObjOperation(key, cname, ns, objType, objName string, wq *utils.WorkerQueue,
	fullSync bool, agl *AviGSGraphLister)

func DeleteAndAddGSGraphForFqdn

func DeleteAndAddGSGraphForFqdn(agl *AviGSGraphLister, oldFqdn, newFqdn, key, cname string)

func DeleteGSOrGSMembers

func DeleteGSOrGSMembers(aviGSGraph *AviGSObjectGraph, members []AviGSK8sObj, modelName string, agl *AviGSGraphLister,
	sharedQ *utils.WorkerQueue, key string)

func DeleteMemberFqdnMapping

func DeleteMemberFqdnMapping(metaObj k8sobjects.MetaObject, hostname, gsName string)

func DequeueIngestion

func DequeueIngestion(key string)

func DeriveGSLBServiceDomainNames

func DeriveGSLBServiceDomainNames(gsName string) []string

func DeriveGSLBServiceName

func DeriveGSLBServiceName(hostname, cname string) string

func GSNameForMemberFqdn

func GSNameForMemberFqdn(cname, ns, objName, hostname string) (string, error)

func GetDescriptionForPathHMName

func GetDescriptionForPathHMName(hmName string, gsMeta *AviGSObjectGraph) string

func GetHmChecksum

func GetHmChecksum(objType string, gsGraph *AviGSObjectGraph) uint32

func GetMemberFqdnMap

func GetMemberFqdnMap() *memberFqdnList

func GetNewObj

func GetNewObj(objType string) (k8sobjects.MetaObject, error)

func GetObjTrafficPriority

func GetObjTrafficPriority(ns, cname string) uint32

func GetObjTrafficRatio

func GetObjTrafficRatio(ns, cname string) uint32

func GetPathFromHmDescription

func GetPathFromHmDescription(hmName, hmDescription string) string

func GetPathHmNameList

func GetPathHmNameList(hm HealthMonitor) []string

func GetTemplateFromHmDescription

func GetTemplateFromHmDescription(hmName, hmDescription string) *string

func OperateOnGSLBHostRule

func OperateOnGSLBHostRule(key string)

func OperateOnHostRule

func OperateOnHostRule(key string)

func OperateOnK8sObject

func OperateOnK8sObject(key string)

func PresentInHealthMonitorPathList

func PresentInHealthMonitorPathList(key PathHealthMonitorDetails, pathHmList []PathHealthMonitorDetails) bool

func PublishAllGraphKeys

func PublishAllGraphKeys()

func PublishKeyToRestLayer

func PublishKeyToRestLayer(tenant, gsName, key string, sharedQueue *utils.WorkerQueue, extraArgs ...string)

func SyncFromIngestionLayer

func SyncFromIngestionLayer(key interface{}, wg *sync.WaitGroup) error

func UpdateMemberFqdnMapping

func UpdateMemberFqdnMapping(metaObj k8sobjects.MetaObject, hostname, gsName string)

Types

type AviGSGraphLister

type AviGSGraphLister struct {
	AviGSGraphStore *store.ObjectMapStore
}

func SharedAviGSGraphLister

func SharedAviGSGraphLister() *AviGSGraphLister

func SharedDeleteGSGraphLister

func SharedDeleteGSGraphLister() *AviGSGraphLister

func (*AviGSGraphLister) Delete

func (a *AviGSGraphLister) Delete(gsName string)

func (*AviGSGraphLister) Get

func (a *AviGSGraphLister) Get(gsName string) (bool, interface{})

func (*AviGSGraphLister) GetAll

func (a *AviGSGraphLister) GetAll() []string

func (*AviGSGraphLister) Save

func (a *AviGSGraphLister) Save(gsName string, graph interface{})

type AviGSK8sObj

type AviGSK8sObj struct {
	Cluster       string
	ObjType       string
	Name          string
	Namespace     string
	IPAddr        string
	Weight        uint32
	Priority      uint32
	IsPassthrough bool
	PublicIP      string
	// Port and protocol will be only used by LB service
	Port               int32
	Proto              string
	TLS                bool
	Paths              []string
	VirtualServiceUUID string
	ControllerUUID     string
	SyncVIPOnly        bool
}

AviGSK8sObj represents a K8S/Openshift object from which a GS was built.

func BuildGSMemberObjFromMeta

func BuildGSMemberObjFromMeta(metaObj k8sobjects.MetaObject, gsFqdn string, gsDomainNames []string) (AviGSK8sObj, error)

type AviGSObjectGraph

type AviGSObjectGraph struct {
	Name        string
	Tenant      string
	DomainNames []string
	// MemberObjs is a list of K8s/openshift objects from which this AviGS was built.
	MemberObjs         []AviGSK8sObj
	GraphChecksum      uint32
	RetryCount         int
	Hm                 HealthMonitor
	HmRefs             []string
	HmTemplate         *string
	SitePersistenceRef *string
	PkiProfileRef      *string
	TTL                *uint32
	GslbPoolAlgorithm  *gslbalphav1.PoolAlgorithmSettings
	GslbDownResponse   *gslbalphav1.DownResponse
	Lock               *sync.RWMutex
}

AviGSObjectGraph is a graph constructed using AviGSNode. It is a one-to-one mapping between the name of the object and the GSLB Model node.

func NewAviGSObjectGraph

func NewAviGSObjectGraph() *AviGSObjectGraph

func (*AviGSObjectGraph) AddUpdateGSMember

func (v *AviGSObjectGraph) AddUpdateGSMember(newMember AviGSK8sObj) bool

AddUpdateGSMember adds/updates a GS member according to the properties in newMember. Returns true if an existing member needs to be removed.

func (*AviGSObjectGraph) BuildNonPathHmName

func (v *AviGSObjectGraph) BuildNonPathHmName(gsName string) string

func (*AviGSObjectGraph) BuildPathHM

func (v *AviGSObjectGraph) BuildPathHM(gsName, path string, isSec bool) PathHealthMonitorDetails

func (*AviGSObjectGraph) CalculateChecksum

func (v *AviGSObjectGraph) CalculateChecksum()

func (*AviGSObjectGraph) ConstructAviGSGraph

func (v *AviGSObjectGraph) ConstructAviGSGraph(gsFqdn, key string, memberObjs []AviGSK8sObj)

func (*AviGSObjectGraph) ConstructAviGSGraphFromMeta

func (v *AviGSObjectGraph) ConstructAviGSGraphFromMeta(gsName, key string, metaObj k8sobjects.MetaObject, gsDomainNames []string)

func (*AviGSObjectGraph) ConstructAviGSGraphFromObjects

func (v *AviGSObjectGraph) ConstructAviGSGraphFromObjects(gsFqdn string, members []AviGSK8sObj, key string)

func (*AviGSObjectGraph) DecrementRetryCounter

func (v *AviGSObjectGraph) DecrementRetryCounter()

func (*AviGSObjectGraph) DeleteMember

func (v *AviGSObjectGraph) DeleteMember(cname, ns, name, objType string)

func (*AviGSObjectGraph) GetChecksum

func (v *AviGSObjectGraph) GetChecksum() uint32

func (*AviGSObjectGraph) GetCopy

func (v *AviGSObjectGraph) GetCopy() *AviGSObjectGraph

func (*AviGSObjectGraph) GetGSMember

func (v *AviGSObjectGraph) GetGSMember(cname, ns, name string) AviGSK8sObj

func (*AviGSObjectGraph) GetGSMembersByCluster

func (v *AviGSObjectGraph) GetGSMembersByCluster(cname string) []AviGSK8sObj

func (*AviGSObjectGraph) GetHmChecksum

func (v *AviGSObjectGraph) GetHmChecksum(hmDescription []string) uint32

func (*AviGSObjectGraph) GetHmPathNamesList

func (v *AviGSObjectGraph) GetHmPathNamesList() []string

func (*AviGSObjectGraph) GetMemberObjList

func (v *AviGSObjectGraph) GetMemberObjList() []string

GetMemberRouteList returns a list of member objects

func (*AviGSObjectGraph) GetMemberObjs

func (v *AviGSObjectGraph) GetMemberObjs() []AviGSK8sObj

func (*AviGSObjectGraph) GetRetryCounter

func (v *AviGSObjectGraph) GetRetryCounter() int

func (*AviGSObjectGraph) GetUniqueMemberObjs

func (v *AviGSObjectGraph) GetUniqueMemberObjs() []AviGSK8sObj

GetUniqueMemberObjs returns a non-duplicated list of objects, uniqueness is checked by the IPAddr TODO: Check the uniqueness depending on the member type (vip or vs uuid)

func (*AviGSObjectGraph) IsHmTypeCustom

func (v *AviGSObjectGraph) IsHmTypeCustom(hmName string) bool

func (*AviGSObjectGraph) MembersLen

func (v *AviGSObjectGraph) MembersLen() int

func (*AviGSObjectGraph) SetPropertiesForGS

func (v *AviGSObjectGraph) SetPropertiesForGS(gsFqdn string, tls bool)

func (*AviGSObjectGraph) SetRetryCounter

func (v *AviGSObjectGraph) SetRetryCounter(num ...int)

func (*AviGSObjectGraph) UpdateAviGSGraphWithGSFqdn

func (v *AviGSObjectGraph) UpdateAviGSGraphWithGSFqdn(key, gsFqdn string, newObj bool, tls bool)

func (*AviGSObjectGraph) UpdateGSMemberFromMetaObj

func (v *AviGSObjectGraph) UpdateGSMemberFromMetaObj(metaObj k8sobjects.MetaObject, gsDomainNames []string)

type HealthMonitor

type HealthMonitor struct {
	Name       string // used for non path HMs
	HMProtocol string
	Port       int32
	Type       string
	PathHM     []PathHealthMonitorDetails // used for path based HMs
}

func (HealthMonitor) GetHMDescription

func (hm HealthMonitor) GetHMDescription(gsName string, template *string) []string

func (HealthMonitor) GetPathHMDescription

func (hm HealthMonitor) GetPathHMDescription(gsName, path string) string

type PathHealthMonitorDetails

type PathHealthMonitorDetails struct {
	Name            string
	IngressProtocol string
	Path            string
}

func (PathHealthMonitorDetails) GetPathHMDescription

func (pathHm PathHealthMonitorDetails) GetPathHMDescription(gsName string, template *string) string

type ThirdPartyMember

type ThirdPartyMember struct {
	Site string
	VIP  string
}

Jump to

Keyboard shortcuts

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