util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreUpState is state when tikv store is normal
	StoreUpState = "Up"
	// StoreOfflineState is state when tikv store is offline
	StoreOfflineState = "Offline"
	// StoreDownState is state when tikv store is down
	StoreDownState = "Down"
	// StoreTombstoneState is state when tikv store is tombstone
	StoreTombstoneState = "Tombstone"
)

Variables

This section is empty.

Functions

func AffinityForNodeSelector

func AffinityForNodeSelector(namespace string, required bool, antiLabels, selector map[string]string) *corev1.Affinity

AffinityForNodeSelector creates an Affinity for NodeSelector Externally we use NodeSelector for simplicity, while internally we convert it to affinity which can express complex scheduling rules

func AntiAffinityForPod

func AntiAffinityForPod(namespace string, antiLabels map[string]string) *corev1.PodAntiAffinity

AntiAffinityForPod creates a PodAntiAffinity with antiLabels

func GetNextOrdinalPodName added in v0.4.0

func GetNextOrdinalPodName(podName string, ordinal int32) string

func GetOrdinalFromPodName added in v0.4.0

func GetOrdinalFromPodName(podName string) (int32, error)

func ResourceRequirement

func ResourceRequirement(spec v1alpha1.ContainerSpec, defaultRequests ...corev1.ResourceRequirements) corev1.ResourceRequirements

ResourceRequirement creates ResourceRequirements for MemberSpec Optionally pass in a default value

Types

This section is empty.

Jump to

Keyboard shortcuts

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