client

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FastMapperAllowedAPIGroups = map[string]bool{
	"":                          true,
	"apiextensions.k8s.io":      true,
	"apps":                      true,
	"batch":                     true,
	"yaks.citrusframework.org":  true,
	"rbac.authorization.k8s.io": true,
	"console.openshift.io":      true,
	"project.openshift.io":      true,
	"operators.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

func GetCurrentNamespace

func GetCurrentNamespace(kubeconfig string) (string, error)

GetCurrentNamespace --.

func GetOutOfClusterConfig

func GetOutOfClusterConfig(kubeconfig string) (*rest.Config, error)

Types

type Client

type Client interface {
	controller.Client
	kubernetes.Interface
	GetScheme() *runtime.Scheme
	GetConfig() *rest.Config
	GetCurrentNamespace(kubeConfig string) (string, error)
}

Client is an abstraction for a k8s client.

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 added in v0.11.0

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 Client)
	InjectConfig(config *rest.Config)
}

Injectable identifies objects that can receive a Client and the rest config.

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.

Directories

Path Synopsis
yaks
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/yaks/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/yaks/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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