Documentation
¶
Overview ¶
Package manager implements the controller manager for all controllers
Index ¶
- func AdminAPIClientFromServiceDiscovery(ctx context.Context, logger logr.Logger, ...) ([]*adminapi.Client, error)
- type AdminAPIClientFactory
- type AdminAPIsDiscoverer
- type Controller
- type ControllerDef
- type GatewayClientsProvider
- type InstanceID
- type Manager
- type NoAvailableEndpointsError
- type SchemaServiceGetter
- type TypeMetaSettingClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAPIClientFromServiceDiscovery ¶
func AdminAPIClientFromServiceDiscovery( ctx context.Context, logger logr.Logger, kongAdminSvcNN k8stypes.NamespacedName, kubeClient client.Client, discoverer AdminAPIsDiscoverer, factory AdminAPIClientFactory, retryOpts ...retry.Option, ) ([]*adminapi.Client, error)
Types ¶
type AdminAPIClientFactory ¶
type AdminAPIsDiscoverer ¶
type Controller ¶
Controller is a Kubernetes controller that can be plugged into Manager.
type ControllerDef ¶
type ControllerDef struct { Enabled bool Controller Controller }
ControllerDef is a specification of a Controller that can be conditionally registered with Manager.
func (*ControllerDef) MaybeSetupWithManager ¶
func (c *ControllerDef) MaybeSetupWithManager(mgr ctrl.Manager) error
MaybeSetupWithManager runs SetupWithManager on the controller if it is enabled.
func (*ControllerDef) Name ¶
func (c *ControllerDef) Name() string
Name returns a human-readable name of the controller.
type GatewayClientsProvider ¶ added in v3.2.0
GatewayClientsProvider is an interface that provides clients for the currently discovered Gateway instances.
type InstanceID ¶ added in v3.4.4
type InstanceID interface {
String() string
}
type Manager ¶ added in v3.4.4
type Manager struct {
// contains filtered or unexported fields
}
func New ¶ added in v3.4.4
func New( ctx context.Context, instanceID InstanceID, c managercfg.Config, logger logr.Logger, ) (*Manager, error)
New configures the controller manager call Start.
func (*Manager) DiagnosticsHandler ¶ added in v3.4.4
DiagnosticsHandler returns the diagnostics HTTP handler if it's enabled in the configuration. Otherwise, it returns nil.
func (*Manager) GetClientsManager ¶ added in v3.4.4
func (m *Manager) GetClientsManager() *clients.AdminAPIClientsManager
GetClientsManager returns the AdminAPIClientsManager used by the manager. TODO: It is used by telemetry to calculate kongVersion, DB mode and router flavor. It shouldn't be exposed so wide, only relevant stuff.
func (*Manager) GetKubeconfig ¶ added in v3.4.4
GetKubeconfig returns the Kubernetes client configuration used by the manager.
type NoAvailableEndpointsError ¶
type NoAvailableEndpointsError struct {
// contains filtered or unexported fields
}
func (NoAvailableEndpointsError) Error ¶
func (e NoAvailableEndpointsError) Error() string
type SchemaServiceGetter ¶ added in v3.2.0
type SchemaServiceGetter struct {
// contains filtered or unexported fields
}
SchemaServiceGetter returns schema service of an admin API client if there is any client available.
func NewSchemaServiceGetter ¶ added in v3.2.0
func NewSchemaServiceGetter(cm GatewayClientsProvider) SchemaServiceGetter
NewSchemaServiceGetter creates a schema service getter that uses given client manager to maintain admin API clients.
func (SchemaServiceGetter) GetSchemaService ¶ added in v3.2.0
func (ssg SchemaServiceGetter) GetSchemaService() kong.AbstractSchemaService
GetSchemaService returns the schema service for admin API client. It uses the configured clients manager to get the clients and then it uses one of those to obtain the service.
type TypeMetaSettingClient ¶
TypeMetaSettingClient decorates client.Client so that it populates the TypeMeta field of the object after fetching it from the API server.
func NewTypeMetaSettingClient ¶
func NewTypeMetaSettingClient(c client.Client) TypeMetaSettingClient