kube

package
v0.0.0-...-da9a61c Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(context, kubeConfigPath string) (*rest.Config, error)

GetConfig returns a *rest.Config based on the current configuration

func SetInstance

func SetInstance(kc Connection)

SetInstance allows the user to set the kubeClient singleton

Types

type Connection

type Connection struct {
	Client        kubernetes.Interface
	DynamicClient dynamic.Interface
	RESTMapper    meta.RESTMapper
}

Connection holds a kubernetes.interface as the Client parameter

func GetConfigInstance

func GetConfigInstance(context, kubeConfigPath string) *Connection

GetConfigInstance returns a Kubernetes interface based on the current configuration

func SetAndGetMock

func SetAndGetMock() *Connection

SetAndGetMock sets the singleton's interface to use a fake ClientSet

Jump to

Keyboard shortcuts

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