client

package
v0.0.0-...-91c9ef9 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FastMapperAllowedAPIGroups = map[string]bool{
	"":                          true,
	"apiextensions.k8s.io":      true,
	"apps":                      true,
	"batch":                     true,
	"rbac.authorization.k8s.io": true,
	"console.openshift.io":      true,
	"operators.coreos.com":      true,
	"monitoring.coreos.com":     true,
}

FastMapperAllowedAPIGroups contains a set of API groups that are allowed when using the fastmapper. Those must correspond to all groups used by the "kamel" binary tool when running out-of-cluster.

Functions

This section is empty.

Types

type Client

type Client interface {
	ctrl.Client
	kubernetes.Interface
	GetScheme() *runtime.Scheme
	GetConfig() *rest.Config
}

Client is an abstraction for a k8s client.

func FromCtrlClientSchemeAndConfig

func FromCtrlClientSchemeAndConfig(client ctrl.Client, scheme *runtime.Scheme, conf *rest.Config) (Client, error)

FromCtrlClientSchemeAndConfig create client from a kubernetes controller client, a scheme and a configuration.

func FromManager

func FromManager(manager manager.Manager) (Client, error)

FromManager creates a new k8s client from a manager object.

func NewClient

func NewClient(fastDiscovery bool) (Client, error)

NewClient creates a new k8s client that can be used from outside or in the cluster.

func NewClientWithConfig

func NewClientWithConfig(fastDiscovery bool, cfg *rest.Config) (Client, error)

NewClientWithConfig creates a new k8s client that can be used from outside or in the cluster.

func NewOutOfClusterClient

func NewOutOfClusterClient(kubeconfig string) (Client, error)

NewOutOfClusterClient creates a new k8s client that can be used from outside the cluster.

type Injectable

type Injectable interface {
	InjectClient(Client)
}

Injectable identifies objects that can receive a Client.

type Provider

type Provider struct {
	Get func() (Client, error)
}

Provider is used to provide a new instance of the Client each time it's required.

Jump to

Keyboard shortcuts

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