kubelb

package
v1.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RouteControllerName = "route-controller"
	CleanupFinalizer    = "kubelb.k8c.io/cleanup"
)
View Source
const (
	BridgeServiceControllerName = "bridge-service-controller"
)
View Source
const (
	EnvoyGlobalCache = "global"
)
View Source
const (
	RequeueAllResources = "requeue-all-for-route"
)
View Source
const (
	SyncSecretControllerName = "sync-secret-controller"
)
View Source
const (
	TenantControllerName = "tenant-controller"
)
View Source
const (
	TenantMigrationControllerName = "tenant-migration-controller"
)

Variables

This section is empty.

Functions

func CreateOrUpdateEndpointSlice

func CreateOrUpdateEndpointSlice(ctx context.Context, client ctrlclient.Client, obj *discoveryv1.EndpointSlice) error

func CreateOrUpdateSecret

func CreateOrUpdateSecret(ctx context.Context, client ctrlclient.Client, obj *corev1.Secret) error

func GetConfig

func GetConfig(ctx context.Context, client ctrlclient.Client, configNamespace string) (*kubelbv1alpha1.Config, error)

func GetKubeconfig

func GetKubeconfig(ctx context.Context, client ctrlruntimeclient.Client, log logr.Logger) (*clientcmdapi.Config, error)

func GetTenant

func GetTenant(ctx context.Context, client ctrlclient.Client, tenantName string) (*kubelbv1alpha1.Tenant, error)

func GetTenantAndConfig

func GetTenantAndConfig(ctx context.Context, client ctrlclient.Client, configNamespace, tenantName string) (*kubelbv1alpha1.Tenant, *kubelbv1alpha1.Config, error)

func RemoveTenantPrefix

func RemoveTenantPrefix(namespace string) string

Types

type BridgeServiceReconciler

type BridgeServiceReconciler struct {
	ctrlclient.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

BridgeServiceReconciler reconciles the "bridge" service. This service is used to forward traffic from tenant namespace to the controller namespace when global topology is used.

func (*BridgeServiceReconciler) Reconcile

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

func (*BridgeServiceReconciler) SetupWithManager

func (r *BridgeServiceReconciler) SetupWithManager(mgr ctrl.Manager) error

type EnvoyCPReconciler

type EnvoyCPReconciler struct {
	client.Client
	EnvoyCache         envoycachev3.SnapshotCache
	EnvoyProxyTopology EnvoyProxyTopology
	PortAllocator      *portlookup.PortAllocator
	Namespace          string
	EnvoyBootstrap     string
	DisableGatewayAPI  bool
	Config             *kubelbv1alpha1.Config
}

func (*EnvoyCPReconciler) ListLoadBalancersAndRoutes

func (r *EnvoyCPReconciler) ListLoadBalancersAndRoutes(ctx context.Context, req ctrl.Request) ([]kubelbv1alpha1.LoadBalancer, []kubelbv1alpha1.Route, error)

func (*EnvoyCPReconciler) Reconcile

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

+kubebuilder:rbac:groups=kubelb.k8c.io,resources=loadbalancers,verbs=get;list;watch +kubebuilder:rbac:groups=kubelb.k8c.io,resources=loadbalancers/status,verbs=get

func (*EnvoyCPReconciler) SetupWithManager

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

type EnvoyProxyTopology

type EnvoyProxyTopology string
const (
	EnvoyProxyTopologyShared    EnvoyProxyTopology = "shared"
	EnvoyProxyTopologyDedicated EnvoyProxyTopology = "dedicated"
	EnvoyProxyTopologyGlobal    EnvoyProxyTopology = "global"
)

func (EnvoyProxyTopology) IsGlobalTopology

func (e EnvoyProxyTopology) IsGlobalTopology() bool

type LoadBalancerReconciler

type LoadBalancerReconciler struct {
	ctrlruntimeclient.Client
	Scheme    *runtime.Scheme
	Cache     cache.Cache
	Namespace string

	PortAllocator      *portlookup.PortAllocator
	EnvoyProxyTopology EnvoyProxyTopology
}

LoadBalancerReconciler reconciles a LoadBalancer object

func (*LoadBalancerReconciler) Reconcile

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

func (*LoadBalancerReconciler) SetupWithManager

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

type RouteReconciler

type RouteReconciler struct {
	ctrlclient.Client
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder

	Namespace          string
	PortAllocator      *portlookup.PortAllocator
	EnvoyProxyTopology EnvoyProxyTopology
	DisableGatewayAPI  bool
}

RouteReconciler reconciles a Route Object

func (*RouteReconciler) Reconcile

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

func (*RouteReconciler) SetupWithManager

func (r *RouteReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*RouteReconciler) UpdateRouteStatus

func (r *RouteReconciler) UpdateRouteStatus(ctx context.Context, route *kubelbv1alpha1.Route, status kubelbv1alpha1.RouteStatus) error

type SyncSecretReconciler

type SyncSecretReconciler struct {
	ctrlclient.Client
	Namespace          string
	EnvoyProxyTopology EnvoyProxyTopology
	Log                logr.Logger
	Scheme             *runtime.Scheme
	Recorder           record.EventRecorder
}

SyncSecretReconciler reconciles an Ingress Object

func (*SyncSecretReconciler) Reconcile

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

func (*SyncSecretReconciler) SetupWithManager

func (r *SyncSecretReconciler) SetupWithManager(mgr ctrl.Manager) error

type TenantMigrationReconciler

type TenantMigrationReconciler struct {
	ctrlclient.Client

	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TenantMigrationReconciler is responsible for migrating namespace to a 1:1 tenant mapping.

func (*TenantMigrationReconciler) Reconcile

func (*TenantMigrationReconciler) SetupWithManager

func (r *TenantMigrationReconciler) SetupWithManager(mgr ctrl.Manager) error

type TenantReconciler

type TenantReconciler struct {
	ctrlclient.Client

	Config   *rest.Config
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

TenantReconciler reconciles an HTTPRoute Object

func (*TenantReconciler) Reconcile

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

func (*TenantReconciler) SetupWithManager

func (r *TenantReconciler) SetupWithManager(mgr ctrl.Manager) error

Directories

Path Synopsis
resources

Jump to

Keyboard shortcuts

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