manager

package
v3.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig(opts ...managercfg.Opt) (managercfg.Config, error)

NewConfig is used to create a new configuration object with default values. Values can be overridden by passing `managercfg.Opt` options.

Note: the default values binding happens in `internal/manager/config` package and this function relies on it. Because of that, NewConfig is not implemented in the `pkg/manager/config` package as that would impose a cyclic dependency. We might want to move the default values binding to `pkg/manager/config` in the future and implement NewConfig there.

Types

type ID

type ID struct {
	// contains filtered or unexported fields
}

ID is a unique identifier for the Kong Ingress Controller instance. It can be an arbitrary string that is unique across all instances.

func NewID

func NewID(s string) (ID, error)

NewID creates a new manager ID from a string (e.g. a Kubernetes object UID).

func NewRandomID

func NewRandomID() ID

NewRandomID generates a new random manager ID.

func (ID) String

func (id ID) String() string

String returns the string representation (usable for various APIs) of the manager ID.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is an object representing an instance of the Kong Ingress Controller.

func NewManager

func NewManager(ctx context.Context, id ID, logger logr.Logger, cfg managercfg.Config) (*Manager, error)

NewManager creates a new instance of the Kong Ingress Controller. It does not start the controller.

func (*Manager) Config added in v3.5.0

func (m *Manager) Config() managercfg.Config

Config returns the configuration of the manager.

func (*Manager) DiagnosticsHandler

func (m *Manager) DiagnosticsHandler() http.Handler

DiagnosticsHandler returns the diagnostics handler of the manager if available. Otherwise, it returns nil.

func (*Manager) GetClientsManager

func (m *Manager) GetClientsManager() *clients.AdminAPIClientsManager

GetClientsManager returns the clients manager associated with the instance.

func (*Manager) GetKubeconfig

func (m *Manager) GetKubeconfig() *rest.Config

GetKubeconfig returns the Kubernetes REST config object associated with the instance.

func (*Manager) ID

func (m *Manager) ID() ID

ID returns the unique identifier of the manager.

func (*Manager) IsReady

func (m *Manager) IsReady() error

IsReady checks if the controller manager is ready to manage resources. It's only valid to call this method after the controller manager has been started with method Run(ctx).

func (*Manager) Run

func (m *Manager) Run(ctx context.Context) error

Run starts the Kong Ingress Controller. It blocks until the context is cancelled. It should be called only once per Manager instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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