util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEndpointsName

func CreateEndpointsName(tenantEnvName, 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 KeepMaxLength added in v1.1.0

func KeepMaxLength(raw string, maxl int) string

KeepMaxLength keep max length of string

func MakePodDNSConfig

func MakePodDNSConfig(clientset kubernetes.Interface, podNamespace, wtNamespace, wtEndpointDNSName string) (podDNSConfig *corev1.PodDNSConfig)

MakePodDNSConfig make pod dns config

func TransStorageClass2RBDVolumeType

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

TransStorageClass2RBDVolumeType transfer k8s storageclass 2 wt 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