routechecks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package routechecks . TODO: document

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAgainstCrossNamespaceBackendReferences

func CheckAgainstCrossNamespaceBackendReferences(input Input) (bool, error)

func CheckBackend

func CheckBackend(input Input) (bool, error)

func CheckBackendIsExistingService

func CheckBackendIsExistingService(input Input) (bool, error)

func CheckGatewayAllowedForNamespace

func CheckGatewayAllowedForNamespace(input Input, parentRef gatewayv1.ParentReference) (bool, error)

func CheckGatewayMatchingHostnames

func CheckGatewayMatchingHostnames(input Input, parentRef gatewayv1.ParentReference) (bool, error)

func CheckGatewayMatchingPorts

func CheckGatewayMatchingPorts(input Input, parentRef gatewayv1.ParentReference) (bool, error)

func CheckGatewayMatchingSection

func CheckGatewayMatchingSection(input Input, parentRef gatewayv1.ParentReference) (bool, error)

func CheckGatewayRouteKindAllowed

func CheckGatewayRouteKindAllowed(input Input, parentRef gatewayv1.ParentReference) (bool, error)

Types

type CheckGatewayFunc

type CheckGatewayFunc func(input Input, ref gatewayv1.ParentReference) (bool, error)

type CheckRuleFunc

type CheckRuleFunc func(input Input) (bool, error)

type GenericRule

type GenericRule interface {
	GetBackendRefs() []gatewayv1.BackendRef
}

type HTTPRouteInput

type HTTPRouteInput struct {
	Ctx       context.Context
	Client    client.Client
	Grants    *gatewayv1beta1.ReferenceGrantList
	HTTPRoute *gatewayv1.HTTPRoute
	// contains filtered or unexported fields
}

func (*HTTPRouteInput) GetClient

func (h *HTTPRouteInput) GetClient() client.Client

func (*HTTPRouteInput) GetContext

func (h *HTTPRouteInput) GetContext() context.Context

func (*HTTPRouteInput) GetGVK

func (*HTTPRouteInput) GetGateway

func (h *HTTPRouteInput) GetGateway(parent gatewayv1.ParentReference) (*gatewayv1.Gateway, error)

func (*HTTPRouteInput) GetGrants

func (h *HTTPRouteInput) GetGrants() []gatewayv1beta1.ReferenceGrant

func (*HTTPRouteInput) GetHostnames

func (h *HTTPRouteInput) GetHostnames() []gatewayv1.Hostname

func (*HTTPRouteInput) GetNamespace

func (h *HTTPRouteInput) GetNamespace() string

func (*HTTPRouteInput) GetRules

func (h *HTTPRouteInput) GetRules() []GenericRule

func (*HTTPRouteInput) SetAllParentCondition

func (h *HTTPRouteInput) SetAllParentCondition(condition metav1.Condition)

func (*HTTPRouteInput) SetParentCondition

func (h *HTTPRouteInput) SetParentCondition(ref gatewayv1.ParentReference, condition metav1.Condition)

type HTTPRouteRule

type HTTPRouteRule struct {
	Rule gatewayv1.HTTPRouteRule
}

HTTPRouteRule is used to implement the GenericRule interface for TLSRoute

func (*HTTPRouteRule) GetBackendRefs

func (t *HTTPRouteRule) GetBackendRefs() []gatewayv1.BackendRef

type Input

type Input interface {
	GetRules() []GenericRule
	GetNamespace() string
	GetClient() client.Client
	GetContext() context.Context
	GetGVK() schema.GroupVersionKind
	GetGrants() []gatewayv1beta1.ReferenceGrant
	GetGateway(parent gatewayv1.ParentReference) (*gatewayv1.Gateway, error)
	GetHostnames() []gatewayv1.Hostname

	SetParentCondition(ref gatewayv1.ParentReference, condition metav1.Condition)
	SetAllParentCondition(condition metav1.Condition)
}

type TCPRouteInput added in v0.1.0

type TCPRouteInput struct {
	Ctx      context.Context
	Client   client.Client
	Grants   *gatewayv1beta1.ReferenceGrantList
	TCPRoute *gatewayv1alpha2.TCPRoute
	// contains filtered or unexported fields
}

func (*TCPRouteInput) GetClient added in v0.1.0

func (h *TCPRouteInput) GetClient() client.Client

func (*TCPRouteInput) GetContext added in v0.1.0

func (h *TCPRouteInput) GetContext() context.Context

func (*TCPRouteInput) GetGVK added in v0.1.0

func (*TCPRouteInput) GetGateway added in v0.1.0

func (h *TCPRouteInput) GetGateway(parent gatewayv1.ParentReference) (*gatewayv1.Gateway, error)

func (*TCPRouteInput) GetGrants added in v0.1.0

func (h *TCPRouteInput) GetGrants() []gatewayv1beta1.ReferenceGrant

func (*TCPRouteInput) GetHostnames added in v0.1.0

func (h *TCPRouteInput) GetHostnames() []gatewayv1.Hostname

func (*TCPRouteInput) GetNamespace added in v0.1.0

func (h *TCPRouteInput) GetNamespace() string

func (*TCPRouteInput) GetRules added in v0.1.0

func (h *TCPRouteInput) GetRules() []GenericRule

func (*TCPRouteInput) SetAllParentCondition added in v0.1.0

func (h *TCPRouteInput) SetAllParentCondition(condition metav1.Condition)

func (*TCPRouteInput) SetParentCondition added in v0.1.0

func (h *TCPRouteInput) SetParentCondition(ref gatewayv1.ParentReference, condition metav1.Condition)

type TCPRouteRule added in v0.1.0

type TCPRouteRule struct {
	Rule gatewayv1alpha2.TCPRouteRule
}

TCPRouteRule is used to implement the GenericRule interface for TLSRoute

func (*TCPRouteRule) GetBackendRefs added in v0.1.0

func (t *TCPRouteRule) GetBackendRefs() []gatewayv1.BackendRef

type TLSRouteInput added in v0.1.0

type TLSRouteInput struct {
	Ctx      context.Context
	Client   client.Client
	Grants   *gatewayv1beta1.ReferenceGrantList
	TLSRoute *gatewayv1alpha2.TLSRoute
	// contains filtered or unexported fields
}

func (*TLSRouteInput) GetClient added in v0.1.0

func (h *TLSRouteInput) GetClient() client.Client

func (*TLSRouteInput) GetContext added in v0.1.0

func (h *TLSRouteInput) GetContext() context.Context

func (*TLSRouteInput) GetGVK added in v0.1.0

func (*TLSRouteInput) GetGateway added in v0.1.0

func (h *TLSRouteInput) GetGateway(parent gatewayv1.ParentReference) (*gatewayv1.Gateway, error)

func (*TLSRouteInput) GetGrants added in v0.1.0

func (h *TLSRouteInput) GetGrants() []gatewayv1beta1.ReferenceGrant

func (*TLSRouteInput) GetHostnames added in v0.1.0

func (h *TLSRouteInput) GetHostnames() []gatewayv1.Hostname

func (*TLSRouteInput) GetNamespace added in v0.1.0

func (h *TLSRouteInput) GetNamespace() string

func (*TLSRouteInput) GetRules added in v0.1.0

func (h *TLSRouteInput) GetRules() []GenericRule

func (*TLSRouteInput) SetAllParentCondition added in v0.1.0

func (h *TLSRouteInput) SetAllParentCondition(condition metav1.Condition)

func (*TLSRouteInput) SetParentCondition added in v0.1.0

func (h *TLSRouteInput) SetParentCondition(ref gatewayv1.ParentReference, condition metav1.Condition)

type TLSRouteRule added in v0.1.0

type TLSRouteRule struct {
	Rule gatewayv1alpha2.TLSRouteRule
}

TLSRouteRule is used to implement the GenericRule interface for TLSRoute

func (*TLSRouteRule) GetBackendRefs added in v0.1.0

func (t *TLSRouteRule) GetBackendRefs() []gatewayv1.BackendRef

type UDPRouteInput added in v0.1.0

type UDPRouteInput struct {
	Ctx      context.Context
	Client   client.Client
	Grants   *gatewayv1beta1.ReferenceGrantList
	UDPRoute *gatewayv1alpha2.UDPRoute
	// contains filtered or unexported fields
}

func (*UDPRouteInput) GetClient added in v0.1.0

func (h *UDPRouteInput) GetClient() client.Client

func (*UDPRouteInput) GetContext added in v0.1.0

func (h *UDPRouteInput) GetContext() context.Context

func (*UDPRouteInput) GetGVK added in v0.1.0

func (*UDPRouteInput) GetGateway added in v0.1.0

func (h *UDPRouteInput) GetGateway(parent gatewayv1.ParentReference) (*gatewayv1.Gateway, error)

func (*UDPRouteInput) GetGrants added in v0.1.0

func (h *UDPRouteInput) GetGrants() []gatewayv1beta1.ReferenceGrant

func (*UDPRouteInput) GetHostnames added in v0.1.0

func (h *UDPRouteInput) GetHostnames() []gatewayv1.Hostname

func (*UDPRouteInput) GetNamespace added in v0.1.0

func (h *UDPRouteInput) GetNamespace() string

func (*UDPRouteInput) GetRules added in v0.1.0

func (h *UDPRouteInput) GetRules() []GenericRule

func (*UDPRouteInput) SetAllParentCondition added in v0.1.0

func (h *UDPRouteInput) SetAllParentCondition(condition metav1.Condition)

func (*UDPRouteInput) SetParentCondition added in v0.1.0

func (h *UDPRouteInput) SetParentCondition(ref gatewayv1.ParentReference, condition metav1.Condition)

type UDPRouteRule added in v0.1.0

type UDPRouteRule struct {
	Rule gatewayv1alpha2.UDPRouteRule
}

UDPRouteRule is used to implement the GenericRule interface for TLSRoute

func (*UDPRouteRule) GetBackendRefs added in v0.1.0

func (t *UDPRouteRule) GetBackendRefs() []gatewayv1.BackendRef

Jump to

Keyboard shortcuts

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