controllers

package
v0.0.0-...-c29da01 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Naming convention: TARGET_REFERENCE.
	GatewayClass_GatewayClassConfigIndex = "__gatewayclass_referencing_gatewayclassconfig"
	GatewayClass_ControllerNameIndex     = "__gatewayclass_controller_name"

	Gateway_GatewayClassIndex = "__gateway_referencing_gatewayclass"

	HTTPRoute_GatewayIndex            = "__httproute_referencing_gateway"
	HTTPRoute_ServiceIndex            = "__httproute_referencing_service"
	HTTPRoute_MeshServiceIndex        = "__httproute_referencing_mesh_service"
	HTTPRoute_RouteRetryFilterIndex   = "__httproute_referencing_retryfilter"
	HTTPRoute_RouteTimeoutFilterIndex = "__httproute_referencing_timeoutfilter"
	HTTPRoute_RouteAuthFilterIndex    = "__httproute_referencing_routeauthfilter"

	TCPRoute_GatewayIndex     = "__tcproute_referencing_gateway"
	TCPRoute_ServiceIndex     = "__tcproute_referencing_service"
	TCPRoute_MeshServiceIndex = "__tcproute_referencing_mesh_service"

	MeshService_PeerIndex      = "__meshservice_referencing_peer"
	Secret_GatewayIndex        = "__secret_referencing_gateway"
	Gatewaypolicy_GatewayIndex = "__gatewaypolicy_referencing_gateway"
)

Variables

This section is empty.

Functions

func EnsureFinalizer

func EnsureFinalizer(ctx context.Context, client client.Client, object client.Object, finalizer string) (didUpdate bool, err error)

EnsureFinalizer ensures that the given object has the given finalizer.

func RegisterFieldIndexes

func RegisterFieldIndexes(ctx context.Context, mgr ctrl.Manager) error

RegisterFieldIndexes registers all of the field indexes for the API gateway controllers. These indexes are similar to indexes used in databases to speed up queries. They allow us to quickly find objects based on a field value.

func RemoveFinalizer

func RemoveFinalizer(ctx context.Context, client client.Client, object client.Object, finalizer string) (didUpdate bool, err error)

RemoveFinalizer removes the given finalizer from the given object.

func SetupGatewayControllerWithManager

func SetupGatewayControllerWithManager(ctx context.Context, mgr ctrl.Manager, config GatewayControllerConfig) (*cache.Cache, error)

SetupWithGatewayControllerManager registers the controller with the given manager.

Types

type GatewayClassConfigController

type GatewayClassConfigController struct {
	client.Client

	Log logr.Logger
}

The GatewayClassConfigController manages the state of GatewayClassConfigs.

func (*GatewayClassConfigController) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*GatewayClassConfigController) SetupWithManager

func (r *GatewayClassConfigController) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

type GatewayClassController

type GatewayClassController struct {
	ControllerName string
	Log            logr.Logger

	client.Client
}

GatewayClassController reconciles a GatewayClass object. The GatewayClass is responsible for defining the behavior of API gateways which reference the given class.

func (*GatewayClassController) Reconcile

func (r *GatewayClassController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles the reconciliation loop for GatewayClass objects.

func (*GatewayClassController) SetupWithManager

func (r *GatewayClassController) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager registers the controller with the given manager.

type GatewayController

type GatewayController struct {
	HelmConfig common.HelmConfig
	Log        logr.Logger
	Translator common.ResourceTranslator

	client.Client
	// contains filtered or unexported fields
}

GatewayController reconciles a Gateway object. The Gateway is responsible for defining the behavior of API gateways.

func (*GatewayController) Reconcile

func (r *GatewayController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile handles the reconciliation loop for Gateway objects.

type GatewayControllerConfig

type GatewayControllerConfig struct {
	HelmConfig              common.HelmConfig
	ConsulClientConfig      *consul.Config
	ConsulServerConnMgr     consul.ServerConnectionManager
	NamespacesEnabled       bool
	CrossNamespaceACLPolicy string
	Partition               string
	Datacenter              string
	AllowK8sNamespacesSet   mapset.Set
	DenyK8sNamespacesSet    mapset.Set
}

GatewayControllerConfig holds the values necessary for configuring the GatewayController.

Jump to

Keyboard shortcuts

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