kube

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNamespace

func GetNamespace(kubeClient *ClientInstance, nsName string) (*corev1.Namespace, error)

GetNamespace returns a namespace object when given a name.

func SetInstance

func SetInstance(kc ClientInstance)

SetInstance allows the user to set the kubeClient singleton

func SetVPAInstance added in v1.3.0

func SetVPAInstance(kc VPAClientInstance)

SetVPAInstance sets the kubeClient for VPA

Types

type ClientInstance

type ClientInstance struct {
	Client kubernetes.Interface
}

ClientInstance is a wrapper around the kubernetes interface for testing purposes

func GetInstance

func GetInstance() *ClientInstance

GetInstance returns a Kubernetes interface based on the current configuration

func GetMockClient added in v1.3.0

func GetMockClient() *ClientInstance

GetMockClient returns a fake client instance for mocking

type VPAClientInstance

type VPAClientInstance struct {
	Client autoscalingv1beta2.Interface
}

VPAClientInstance is a wrapper around the autoscaling interface for testing purposes

func GetMockVPAClient added in v1.3.0

func GetMockVPAClient() *VPAClientInstance

GetMockVPAClient returns fake vpa client instance for mocking.

func GetVPAInstance

func GetVPAInstance() *VPAClientInstance

GetVPAInstance returns an interface for VPA based on the current configuration

Jump to

Keyboard shortcuts

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