nodes

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Gateway = GraphSchema{
		Type:        "Gateway",
		GetGateways: GatewayGetGw,
		GetRoutes:   GatewayToRoutes,
	}
	GatewayClass = GraphSchema{
		Type:        "GatewayClass",
		GetGateways: GatewayClassGetGw,
		GetRoutes:   NoOperation,
	}
	Secret = GraphSchema{
		Type:        "Secret",
		GetGateways: SecretToGateways,
		GetRoutes:   NoOperation,
	}
	Service = GraphSchema{
		Type:        "Service",
		GetGateways: ServiceToGateways,
		GetRoutes:   ServiceToRoutes,
	}
	Endpoint = GraphSchema{
		Type:        "Endpoints",
		GetGateways: EndpointToGateways,
		GetRoutes:   EndpointToRoutes,
	}
	HTTPRoute = GraphSchema{
		Type:        lib.HTTPRoute,
		GetGateways: HTTPRouteToGateway,
		GetRoutes:   HTTPRouteChanges,
	}
	SupportedGraphTypes = GraphDescriptor{
		Gateway,
		GatewayClass,
		Secret,
		Service,
		Endpoint,
		HTTPRoute,
	}
)

Functions

func AddTLSNode

func AddTLSNode(key string, object *AviObjectGraph, gateway *gatewayv1.Gateway, secretObj *corev1.Secret, encodedCertNameIndexMap map[string][]int)

func BuildPortProtocols

func BuildPortProtocols(gateway *gatewayv1.Gateway, key string) []nodes.AviPortHostProtocol

func BuildTLSNodesForGateway

func BuildTLSNodesForGateway(gateway *gatewayv1.Gateway, key string) []*nodes.AviTLSKeyCertNode

func BuildVsVipNodeForGateway

func BuildVsVipNodeForGateway(gateway *gatewayv1.Gateway, vsName string) *nodes.AviVSVIPNode

func DeleteTLSNode

func DeleteTLSNode(key string, object *AviObjectGraph, gateway *gatewayv1.Gateway, secretObj *corev1.Secret, encodedCertNameIndexMap map[string][]int)

func DequeueIngestion

func DequeueIngestion(key string, fullsync bool)

func EndpointToGateways

func EndpointToGateways(namespace, name, key string) ([]string, bool)

func EndpointToRoutes

func EndpointToRoutes(namespace, name, key string) ([]string, bool)

func GatewayClassGetGw

func GatewayClassGetGw(namespace, name, key string) ([]string, bool)

func GatewayGetGw

func GatewayGetGw(namespace, name, key string) ([]string, bool)

func GatewayToRoutes

func GatewayToRoutes(namespace, name, key string) ([]string, bool)

func HTTPRouteChanges

func HTTPRouteChanges(namespace, name, key string) ([]string, bool)

func HTTPRouteToGateway

func HTTPRouteToGateway(namespace, name, key string) ([]string, bool)

func NoOperation

func NoOperation(namespace, name, key string) ([]string, bool)

func SecretToGateways

func SecretToGateways(namespace, name, key string) ([]string, bool)

func ServiceToGateways

func ServiceToGateways(namespace, name, key string) ([]string, bool)

func ServiceToRoutes

func ServiceToRoutes(namespace, name, key string) ([]string, bool)

func TLSNodeFromSecret

func TLSNodeFromSecret(secretObj *corev1.Secret, hostname, certName, key string) *nodes.AviTLSKeyCertNode

Types

type AviObjectGraph

type AviObjectGraph struct {
	*nodes.AviObjectGraph
}

func NewAviObjectGraph

func NewAviObjectGraph() *AviObjectGraph

func (*AviObjectGraph) BuildChildVS

func (o *AviObjectGraph) BuildChildVS(key string, routeModel RouteModel, parentNsName string, rule *Rule, childVSes map[string]struct{}, fullsync bool)

func (*AviObjectGraph) BuildGatewayParent

func (o *AviObjectGraph) BuildGatewayParent(gateway *gatewayv1.Gateway, key string) *nodes.AviEvhVsNode

func (*AviObjectGraph) BuildGatewayVs

func (o *AviObjectGraph) BuildGatewayVs(gateway *gatewayv1.Gateway, key string)

func (*AviObjectGraph) BuildHTTPPolicySet

func (o *AviObjectGraph) BuildHTTPPolicySet(key string, vsNode *nodes.AviEvhVsNode, routeModel RouteModel, rule *Rule)

func (*AviObjectGraph) BuildHTTPPolicySetHTTPRequestRedirectRules

func (o *AviObjectGraph) BuildHTTPPolicySetHTTPRequestRedirectRules(key string, vsNode *nodes.AviEvhVsNode, routeModel RouteModel, filters []*Filter)

func (*AviObjectGraph) BuildHTTPPolicySetHTTPRequestRules

func (o *AviObjectGraph) BuildHTTPPolicySetHTTPRequestRules(key string, vsNode *nodes.AviEvhVsNode, routeModel RouteModel, filters []*Filter)

func (*AviObjectGraph) BuildHTTPPolicySetHTTPResponseRules

func (o *AviObjectGraph) BuildHTTPPolicySetHTTPResponseRules(key string, vsNode *nodes.AviEvhVsNode, routeModel RouteModel, filters []*Filter)

func (*AviObjectGraph) BuildHTTPPolicySetHTTPRuleHdrAction

func (o *AviObjectGraph) BuildHTTPPolicySetHTTPRuleHdrAction(key string, action string, header *Header, headerIndex uint32) *models.HTTPHdrAction

func (*AviObjectGraph) BuildL4PolicySet

func (o *AviObjectGraph) BuildL4PolicySet(key string, vsNode *nodes.AviEvhVsNode, routeModel RouteModel, rule *Rule)

func (*AviObjectGraph) BuildPGPool

func (o *AviObjectGraph) BuildPGPool(key, parentNsName string, childVsNode *nodes.AviEvhVsNode, routeModel RouteModel, rule *Rule)

func (*AviObjectGraph) BuildVHMatch

func (o *AviObjectGraph) BuildVHMatch(key string, vsNode *nodes.AviEvhVsNode, rule *Rule, hosts []string)

func (*AviObjectGraph) DeleteStaleChildVSes

func (o *AviObjectGraph) DeleteStaleChildVSes(key string, routeModel RouteModel, childVSes map[string]struct{}, fullsync bool)

func (*AviObjectGraph) ProcessL4Routes

func (o *AviObjectGraph) ProcessL4Routes(key string, routeModel RouteModel, parentNsName string)

func (*AviObjectGraph) ProcessL7Routes

func (o *AviObjectGraph) ProcessL7Routes(key string, routeModel RouteModel, parentNsName string, childVSes map[string]struct{}, fullsync bool)

func (*AviObjectGraph) ProcessRouteDeletion

func (o *AviObjectGraph) ProcessRouteDeletion(key string, routeModel RouteModel, fullsync bool)

type Backend

type Backend struct {
	Name      string
	Namespace string
	Port      int32
	Weight    int32
}

type Filter

type Filter struct {
	Type           string
	RequestFilter  *HeaderFilter
	ResponseFilter *HeaderFilter
	RedirectFilter *RedirectFilter
}

type GraphDescriptor

type GraphDescriptor []GraphSchema

func ConfigDescriptor

func ConfigDescriptor() GraphDescriptor

func (GraphDescriptor) GetByType

func (descriptor GraphDescriptor) GetByType(name string) (GraphSchema, bool)

type GraphSchema

type GraphSchema struct {
	Type        string
	GetGateways func(string, string, string) ([]string, bool)
	GetRoutes   func(string, string, string) ([]string, bool)
}
type Header struct {
	Name  string
	Value string
}

type HeaderFilter

type HeaderFilter struct {
	Set    []*Header
	Add    []*Header
	Remove []string
}

type HeaderMatch

type HeaderMatch struct {
	Type  string
	Name  string
	Value string
}

type Headers

type Headers []*Header

func (Headers) Len

func (h Headers) Len() int

func (Headers) Less

func (h Headers) Less(i, j int) bool

func (Headers) Swap

func (h Headers) Swap(i, j int)

type Match

type Match struct {
	PathMatch   *PathMatch
	HeaderMatch []*HeaderMatch
}

type Matches

type Matches []*Match

func (Matches) Len

func (m Matches) Len() int

func (Matches) Less

func (m Matches) Less(i, j int) bool

func (Matches) Swap

func (m Matches) Swap(i, j int)

type PathMatch

type PathMatch struct {
	Path string
	//Exact, PathPrefix
	Type string
}

type RedirectFilter

type RedirectFilter struct {
	Host       string
	StatusCode int32
}

type RouteConfig

type RouteConfig struct {
	Rules []*Rule
	Hosts []string
}

type RouteModel

type RouteModel interface {
	GetName() string
	GetNamespace() string
	GetType() string
	GetSpec() interface{}
	ParseRouteRules() *RouteConfig
	Exists() bool
	GetParents() sets.Set[string]
}

func GetHTTPRouteModel

func GetHTTPRouteModel(key string, name, namespace string) (RouteModel, error)

func NewRouteModel

func NewRouteModel(key, objType, name, namespace string) (RouteModel, error)

type Rule

type Rule struct {
	Matches  []*Match
	Filters  []*Filter
	Backends []*Backend
}

Jump to

Keyboard shortcuts

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