kube

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 24 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Kubernetes            kubernetes.Interface
	Client                kubernetes.Interface
	DynamicClient         dynamic.Interface
	CachedDiscoveryClient discovery.CachedDiscoveryInterface
	Mapper                meta.RESTMapper
	DefaultNamespace      string
	Context               string
)

Functions

func GetClientConfig

func GetClientConfig(context, configPath string, configData []byte, configPathMergeList []string) (clientcmd.ClientConfig, error)

func GroupVersionResourceByKind

func GroupVersionResourceByKind(client kubernetes.Interface, kind string) (schema.GroupVersionResource, error)

func Init

func Init(opts InitOptions) error

func NewKubeConfigGetter added in v0.5.0

Types

type ClientGetterFromConfigData added in v0.5.0

type ClientGetterFromConfigData struct {
	Context          string
	ConfigDataBase64 string

	ClientConfig clientcmd.ClientConfig
}

func NewClientGetterFromConfigData added in v0.5.0

func NewClientGetterFromConfigData(context, configDataBase64 string) (*ClientGetterFromConfigData, error)

func (*ClientGetterFromConfigData) ToDiscoveryClient added in v0.5.0

func (getter *ClientGetterFromConfigData) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)

func (*ClientGetterFromConfigData) ToRESTConfig added in v0.5.0

func (getter *ClientGetterFromConfigData) ToRESTConfig() (*rest.Config, error)

func (*ClientGetterFromConfigData) ToRESTMapper added in v0.5.0

func (getter *ClientGetterFromConfigData) ToRESTMapper() (meta.RESTMapper, error)

func (*ClientGetterFromConfigData) ToRawKubeConfigLoader added in v0.5.0

func (getter *ClientGetterFromConfigData) ToRawKubeConfigLoader() clientcmd.ClientConfig

type ContextClient added in v0.5.0

type ContextClient struct {
	ContextName      string
	ContextNamespace string
	Client           kubernetes.Interface
}

func GetAllContextsClients

func GetAllContextsClients(opts GetAllContextsClientsOptions) ([]*ContextClient, error)

type GetAllContextsClientsOptions

type GetAllContextsClientsOptions struct {
	ConfigPath          string
	ConfigDataBase64    string
	ConfigPathMergeList []string
}

type InitOptions

type InitOptions struct {
	KubeConfigOptions
}

type KubeConfig

type KubeConfig struct {
	Config           *rest.Config
	Context          string
	DefaultNamespace string
}

func GetKubeConfig

func GetKubeConfig(opts KubeConfigOptions) (*KubeConfig, error)

type KubeConfigGetterOptions added in v0.5.0

type KubeConfigGetterOptions struct {
	KubeConfigOptions

	Namespace        string
	BearerToken      string
	APIServer        string
	CAFile           string
	Impersonate      string
	ImpersonateGroup []string
}

type KubeConfigOptions

type KubeConfigOptions struct {
	Context             string
	ConfigPath          string
	ConfigDataBase64    string
	ConfigPathMergeList []string
}

Jump to

Keyboard shortcuts

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