client

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package client is the client for kubeconfig

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MappingFor added in v0.4.0

func MappingFor(restMapper meta.RESTMapper, resourceOrKindArg string) (*meta.RESTMapping, error)

MappingFor returns the RESTMapping for the given resource or kind argument.

Types

type Clientset

type Clientset interface {
	ToRESTConfig() (*rest.Config, error)
	ToRawKubeConfigLoader() clientcmd.ClientConfig
	ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
	ToRESTMapper() (meta.RESTMapper, error)
	ToRESTClient() (*rest.RESTClient, error)
	ToTypedClient() (kubernetes.Interface, error)
	ToTypedKwokClient() (versioned.Interface, error)
	ToDynamicClient() (dynamic.Interface, error)
}

Clientset is a set of Kubernetes clients.

func NewClientset

func NewClientset(masterURL, kubeconfigPath string, opts ...Option) (Clientset, error)

NewClientset creates a new clientset.

type Option

type Option func(*clientset)

Option is a function that configures a clientset.

func WithImpersonate

func WithImpersonate(impersonateConfig rest.ImpersonationConfig) Option

WithImpersonate sets the impersonation config.

Jump to

Keyboard shortcuts

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