util

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Set in https://github.com/pravega/pravega/blob/master/docker/bookkeeper/entrypoint.sh#L21
	PravegaPath = "pravega"
	ZkFinalizer = "cleanUpZookeeper"
)
View Source
const (
	MajorMinorVersionRegexp string = `^v?(?P<Version>[0-9]+\.[0-9]+\.[0-9]+)`
)

Variables

This section is empty.

Functions

func BookkeeperImage

func BookkeeperImage(p *v1alpha1.PravegaCluster) (image string)

func BookkeeperTargetImage

func BookkeeperTargetImage(p *v1alpha1.PravegaCluster) (string, error)

func CompareVersions

func CompareVersions(v1, v2, operator string) (bool, error)

func ConfigMapNameForBookie

func ConfigMapNameForBookie(clusterName string) string

func ConfigMapNameForController

func ConfigMapNameForController(clusterName string) string

func ConfigMapNameForSegmentstore

func ConfigMapNameForSegmentstore(clusterName string) string

func ContainsString

func ContainsString(slice []string, str string) bool

func ContainsVersion

func ContainsVersion(list []string, version string) bool

func DeleteAllZnodes

func DeleteAllZnodes(p *v1alpha1.PravegaCluster) (err error)

Delete all znodes related to a specific Pravega cluster

func DeploymentNameForController

func DeploymentNameForController(clusterName string) string

func DownwardAPIEnv

func DownwardAPIEnv() []corev1.EnvVar

func GetClusterExpectedSize

func GetClusterExpectedSize(p *v1alpha1.PravegaCluster) (size int)

func GetPodVersion

func GetPodVersion(pod *v1.Pod) string

func HeadlessServiceNameForBookie

func HeadlessServiceNameForBookie(clusterName string) string

func HeadlessServiceNameForSegmentStore

func HeadlessServiceNameForSegmentStore(clusterName string) string

func HealthcheckCommand

func HealthcheckCommand(port int32) []string

func IsPodReady

func IsPodReady(pod *corev1.Pod) bool

func LabelsForBookie

func LabelsForBookie(pravegaCluster *v1alpha1.PravegaCluster) map[string]string

func LabelsForController

func LabelsForController(pravegaCluster *v1alpha1.PravegaCluster) map[string]string

func LabelsForPravegaCluster

func LabelsForPravegaCluster(pravegaCluster *v1alpha1.PravegaCluster) map[string]string

func LabelsForSegmentStore

func LabelsForSegmentStore(pravegaCluster *v1alpha1.PravegaCluster) map[string]string

func ListSubTreeBFS

func ListSubTreeBFS(conn *zk.Conn, root string) (*list.List, error)

Construct a BFS tree

func Min

func Min(x, y int32) int32

Min returns the smaller of x or y.

func NormalizeVersion

func NormalizeVersion(version string) (string, error)

func PdbNameForBookie

func PdbNameForBookie(clusterName string) string

func PdbNameForController

func PdbNameForController(clusterName string) string

func PdbNameForSegmentstore

func PdbNameForSegmentstore(clusterName string) string

func PodAntiAffinity

func PodAntiAffinity(component string, clusterName string) *corev1.Affinity

func PravegaControllerServiceURL

func PravegaControllerServiceURL(pravegaCluster v1alpha1.PravegaCluster) string

func PravegaImage

func PravegaImage(p *v1alpha1.PravegaCluster) (image string)

func PravegaTargetImage

func PravegaTargetImage(p *v1alpha1.PravegaCluster) (string, error)

func PvcIsOrphan

func PvcIsOrphan(stsPvcName string, replicas int32) bool

func RemoveString

func RemoveString(slice []string, str string) (result []string)

func ServiceNameForController

func ServiceNameForController(clusterName string) string

func ServiceNameForSegmentStore

func ServiceNameForSegmentStore(clusterName string, index int32) string

func StatefulSetNameForBookie

func StatefulSetNameForBookie(clusterName string) string

func StatefulSetNameForSegmentstore

func StatefulSetNameForSegmentstore(clusterName string) string

func WaitForClusterToTerminate

func WaitForClusterToTerminate(kubeClient client.Client, p *v1alpha1.PravegaCluster) (err error)

Wait for pods in cluster to be terminated

Types

This section is empty.

Jump to

Keyboard shortcuts

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