Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentNamespace

func GetCurrentNamespace(kubeconfig string) (string, error)

GetCurrentNamespace --

func GetOutOfClusterConfig

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

func GetValidKubeConfig

func GetValidKubeConfig(kubeconfig string) string

Types

type Client

type Client interface {
	controller.Client
	kubernetes.Interface
	GetScheme() *runtime.Scheme
}

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() (Client, error)

NewClient 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)
	InjectConfig(*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

Jump to

Keyboard shortcuts

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