k8sclient

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterSize

type ClusterSize struct {
	Nodes int
	Cores int
}

ClusterSize defines the cluster status.

type K8sClient

type K8sClient interface {
	// GetClusterSize counts schedulable nodes and cores in the cluster
	GetClusterSize() (*ClusterSize, error)
	// UpdateResources updates the resource needs for the containers in the target
	UpdateResources(resources map[string]apiv1.ResourceRequirements) error
}

K8sClient - Wraps all needed client functionalities for autoscaler

func NewK8sClient

func NewK8sClient(namespace, target, kubeconfig string, dryRun bool) (K8sClient, error)

NewK8sClient gives a k8sClient with the given dependencies.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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