util

package
v5.2.2-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEndpointsName

func CreateEndpointsName(tenantName, serviceName, uuid string) string

CreateEndpointsName creates name for third-party endpoints the names of Kubernetes resources should be up to maximum length of 253 characters and consist of lower case alphanumeric characters, -, and ., but certain resources have more specific restrictions.

func DescribePodStatus

func DescribePodStatus(clientset kubernetes.Interface, pod *corev1.Pod, podStatus *pb.PodStatus, f k8sutil.ListEventsByPod)

DescribePodStatus -

func MakePodDNSConfig

func MakePodDNSConfig(clientset kubernetes.Interface, podNamespace, rbdNamespace, rbdEndpointDNSName string) (podDNSConfig *corev1.PodDNSConfig)

MakePodDNSConfig make pod dns config

func TransStorageClass2RBDVolumeType

func TransStorageClass2RBDVolumeType(sc *storagev1.StorageClass) *dbmodel.TenantServiceVolumeType

TransStorageClass2RBDVolumeType transfer k8s storageclass 2 rbd volumeType

func ValidateVolumeCapacity

func ValidateVolumeCapacity(validation string, capacity int64) error

ValidateVolumeCapacity validate volume capacity

Types

type PodStatusAdvice

type PodStatusAdvice string

PodStatusAdvice -

var PodStatusAdviceInitiating PodStatusAdvice = "Initiating"

PodStatusAdviceInitiating -

var PodStatusAdviceOOM PodStatusAdvice = "OutOfMemory"

PodStatusAdviceOOM -

var PodStatusAdviceUnhealthy PodStatusAdvice = "Unhealthy"

PodStatusAdviceUnhealthy -

func (PodStatusAdvice) String

func (p PodStatusAdvice) String() string

String converts PodStatusAdvice to string

type SortableConditionType

type SortableConditionType []corev1.PodCondition

SortableConditionType implements sort.Interface for []PodCondition based on the Type field.

func (SortableConditionType) Len

func (s SortableConditionType) Len() int

func (SortableConditionType) Less

func (s SortableConditionType) Less(i, j int) bool

func (SortableConditionType) Swap

func (s SortableConditionType) Swap(i, j int)

Jump to

Keyboard shortcuts

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