k8s

package
Version: v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeNameSpec = "nodeName"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sWrapper

type K8sWrapper interface {
	GetPod(namespace string, name string) (*v1.Pod, error)
	GetNode(nodeName string) (*v1.Node, error)
	ListPods(nodeName string) (*v1.PodList, error)
	GetPodFromAPIServer(namespace string, name string) (*v1.Pod, error)
	AnnotatePod(podNamespace string, podName string, key string, val string) error
	AdvertiseCapacityIfNotSet(nodeName string, resourceName string, capacity int) error
	GetENIConfig(eniConfigName string) (*v1alpha1.ENIConfig, error)
	BroadcastEvent(obj runtime.Object, reason string, message string, eventType string)
}

K8sWrapper represents an interface with all the common operations on K8s objects

func NewK8sWrapper

func NewK8sWrapper(client client.Client, coreV1 corev1.CoreV1Interface,
	podController custom.Controller) K8sWrapper

NewK8sWrapper returns a new K8sWrapper

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL