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
Click to show internal directories.
Click to hide internal directories.