util

package
v0.0.0-...-66ead01 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigMap = map[types.UID]*ConfigMapEntry{}
View Source
var KubeletAddress = make(map[string]string)

KubeletAddress map of node ip to kubelet address (ip or hostname)

View Source
var KubeletPorts = make(map[string]int32)

KubeletPorts map of node ip to kubelet port

View Source
var RestorePods = make(map[string]*RestorePod)

Functions

func CreatePod

func CreatePod(client client.Client, ctx context.Context, labelSelector *metav1.LabelSelector, psPod *PsPod) string

func DeletePod

func DeletePod(c client.Client, ctx context.Context, pod *v1.Pod)

func DetermineRecoveryNode

func DetermineRecoveryNode(currentHostIp string) string

func GetPodsBySelector

func GetPodsBySelector(client client.Client, ctx context.Context, labelSelector *metav1.LabelSelector) ([]v1.Pod, error)

func SaveMetrics

func SaveMetrics(
	statsEntry *generated.StatsEntry,
	startTime int64,
	kubeletDuration int,
	checkpointImageCreationStartTime int64,
	checkpointImageCreationDuration int,
	transferStartTime int64,
	transferDuration int,
	metricName string,
	application string,
	host string,
)

func UpdatePod

func UpdatePod(psPod *PsPod, pod *v1.Pod)

Types

type ConfigMapEntry

type ConfigMapEntry struct {
	Id            types.UID
	Mode          string
	LabelSelector *v12.LabelSelector
	Interval      int
	LivenessProbe Probe
	Pods          []*PsPod
}

type Probe

type Probe struct {
	Interval int
	Port     int
	Path     string
}

type PsPod

type PsPod struct {
	Uid          string
	Name         string
	Ip           string
	HostIp       string
	Restarts     int32
	Deleted      bool
	RecoveryNode string
	KRef         *v1.Pod
}

type RestorePod

type RestorePod struct {
	TemplateHash string
	OldPod       *v1.Pod
}

Jump to

Keyboard shortcuts

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