kube

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: Apache-2.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientCmd

func BuildClientCmd(kubeconfig, context string, overrides ...func(configOverrides *clientcmd.ConfigOverrides)) clientcmd.ClientConfig

func BuildClientConfig

func BuildClientConfig(kubeconfig, context string) (*rest.Config, error)

func DefaultRestConfig

func DefaultRestConfig(kubeconfig, configContext string, fns ...func(config *rest.Config)) (*rest.Config, error)

func NewClientConfigForRestConfig

func NewClientConfigForRestConfig(restConfig *rest.Config) clientcmd.ClientConfig

NewClientConfigForRestConfig creates a new k8s clientcmd.ClientConfig from the given rest.Config.

func SetRestDefaults

func SetRestDefaults(config *rest.Config) *rest.Config

func WaitForCacheSync added in v0.2.4

func WaitForCacheSync(name string, stop <-chan struct{}, cacheSyncs ...cache.InformerSynced) (r bool)

Types

type CLIClient

type CLIClient interface {
	Client
	DynamicClientFor(gvk schema.GroupVersionKind, obj *unstructured.Unstructured, namespace string) (dynamic.ResourceInterface, error)
}

func NewCLIClient

func NewCLIClient(clientCfg clientcmd.ClientConfig, opts ...ClientOption) (CLIClient, error)

type Client

type Client interface {
	RESTConfig() *rest.Config

	Ext() kubeExtClient.Interface

	Kube() kubernetes.Interface

	Dynamic() dynamic.Interface

	Metadata() metadata.Interface

	Informers() informerfactory.InformerFactory

	ClusterID() cluster.ID
}

func NewClient added in v0.2.4

func NewClient(clientCfg clientcmd.ClientConfig, cluster cluster.ID) (Client, error)

type ClientOption

type ClientOption func(cliClient CLIClient) CLIClient

func WithCluster added in v0.2.4

func WithCluster(id cluster.ID) ClientOption

func WithRevision

func WithRevision(revision string) ClientOption

type PartialFactory added in v0.2.4

type PartialFactory interface {

	// DynamicClient returns a dynamic client ready for use
	DynamicClient() (dynamic.Interface, error)

	// KubernetesClientSet gives you back an external clientset
	KubernetesClientSet() (*kubernetes.Clientset, error)

	// Returns a RESTClient for accessing Kubernetes resources or an error.
	RESTClient() (*rest.RESTClient, error)
	// contains filtered or unexported methods
}

Directories

Path Synopsis
krt

Jump to

Keyboard shortcuts

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