routechecks

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 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

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

func (*TCPRouteInput) GetClient

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

func (*TCPRouteInput) GetContext

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

func (*TCPRouteInput) GetGVK

func (*TCPRouteInput) GetGateway

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

func (*TCPRouteInput) GetGrants

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

func (*TCPRouteInput) GetHostnames

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

func (*TCPRouteInput) GetNamespace

func (h *TCPRouteInput) GetNamespace() string

func (*TCPRouteInput) GetRules

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

func (*TCPRouteInput) SetAllParentCondition

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

func (*TCPRouteInput) SetParentCondition

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

type TCPRouteRule

type TCPRouteRule struct {
	Rule gatewayv1alpha2.TCPRouteRule
}

TCPRouteRule is used to implement the GenericRule interface for TLSRoute

func (*TCPRouteRule) GetBackendRefs

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

type TLSRouteInput

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

func (*TLSRouteInput) GetClient

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

func (*TLSRouteInput) GetContext

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

func (*TLSRouteInput) GetGVK

func (*TLSRouteInput) GetGateway

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

func (*TLSRouteInput) GetGrants

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

func (*TLSRouteInput) GetHostnames

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

func (*TLSRouteInput) GetNamespace

func (h *TLSRouteInput) GetNamespace() string

func (*TLSRouteInput) GetRules

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

func (*TLSRouteInput) SetAllParentCondition

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

func (*TLSRouteInput) SetParentCondition

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

type TLSRouteRule

type TLSRouteRule struct {
	Rule gatewayv1alpha2.TLSRouteRule
}

TLSRouteRule is used to implement the GenericRule interface for TLSRoute

func (*TLSRouteRule) GetBackendRefs

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

type UDPRouteInput

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

func (*UDPRouteInput) GetClient

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

func (*UDPRouteInput) GetContext

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

func (*UDPRouteInput) GetGVK

func (*UDPRouteInput) GetGateway

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

func (*UDPRouteInput) GetGrants

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

func (*UDPRouteInput) GetHostnames

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

func (*UDPRouteInput) GetNamespace

func (h *UDPRouteInput) GetNamespace() string

func (*UDPRouteInput) GetRules

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

func (*UDPRouteInput) SetAllParentCondition

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

func (*UDPRouteInput) SetParentCondition

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

type UDPRouteRule

type UDPRouteRule struct {
	Rule gatewayv1alpha2.UDPRouteRule
}

UDPRouteRule is used to implement the GenericRule interface for TLSRoute

func (*UDPRouteRule) GetBackendRefs

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

Jump to

Keyboard shortcuts

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