utils

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 9 modules, 8 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Root ZNode for storing all zookeeper-operator related metadata.
	ZKMetaRoot = "/zookeeper-operator"
)
View Source
const (
	ZkFinalizer = "cleanUpZookeeperPVC"
)

Variables

This section is empty.

Functions

func BecomeLeader added in v0.2.14

func BecomeLeader(ctx context.Context, cfg *rest.Config, lockName, namespace string) error

BecomeLeader with pre-check cluster status - is there a previous pod in bad state?

func ContainerPortByName added in v0.2.6

func ContainerPortByName(ports []corev1.ContainerPort, name string) (cPort int32, err error)

ContainerPortByName returns a container port of name provided

func ContainsString

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

func GetMetaPath added in v0.2.6

func GetMetaPath(zoo *v1beta1.ZookeeperCluster) (path string)

func GetZkServiceUri added in v0.2.6

func GetZkServiceUri(zoo *v1beta1.ZookeeperCluster) (zkUri string)

func IsPVCOrphan

func IsPVCOrphan(zkPvcName string, replicas int32) bool

func RemoveString

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

func ServicePortByName

func ServicePortByName(ports []corev1.ServicePort, name string) (port corev1.ServicePort, err error)

ServicePortByName returns a container port of name provided

Types

This section is empty.

Jump to

Keyboard shortcuts

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