util

package
v0.0.0-...-5fa7f0c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEquels

func CheckEquels(from_env *appsv1.StatefulSetSpec, from_crd *appsv1.StatefulSetSpec, text string) (int32, bool, error)

func CreateAdditionalVolumes

func CreateAdditionalVolumes(
	k8sClient k8s.K8sClient,
	namespace string,
	volumeConfigs []opsterv1.AdditionalVolume,
) (
	retVolumes []corev1.Volume,
	retVolumeMounts []corev1.VolumeMount,
	retData []byte,
	returnErr error,
)

func CreateClientForCluster

func CreateClientForCluster(
	k8sClient k8s.K8sClient,
	ctx context.Context,
	cluster *opsterv1.OpenSearchCluster,
	transport http.RoundTripper,
) (*services.OsClusterClient, error)

func DataNodesCount

func DataNodesCount(k8sClient k8s.K8sClient, cr *opsterv1.OpenSearchCluster) int32

func FetchOpensearchCluster

func FetchOpensearchCluster(
	k8sClient k8s.K8sClient,
	ctx context.Context,
	ref types.NamespacedName,
) (*opsterv1.OpenSearchCluster, error)

func GetAvailableOpenSearchNodes

func GetAvailableOpenSearchNodes(k8sClient k8s.K8sClient, ctx context.Context, cluster *opsterv1.OpenSearchCluster, lg logr.Logger) int32

GetAvailableOpenSearchNodes returns the sum of ready pods for all node pools

func GetClusterHealth

func GetClusterHealth(k8sClient k8s.K8sClient, ctx context.Context, cluster *opsterv1.OpenSearchCluster, lg logr.Logger) opsterv1.OpenSearchHealth

GetClusterHealth returns the health of OpenSearch cluster

func GetSha1Sum

func GetSha1Sum(data []byte) (string, error)

Generates a checksum of binary data using the SHA1 algorithm.

func OpensearchClusterURL

func OpensearchClusterURL(cluster *opsterv1.OpenSearchCluster) string

func ReadOrGenerateCaCert

func ReadOrGenerateCaCert(pki tls.PKI, k8sClient k8s.K8sClient, instance *opsterv1.OpenSearchCluster) (tls.Cert, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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