utils

package
v0.1.0-alpha.25 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 5 * time.Minute
)

Variables

This section is empty.

Functions

func CleanEtcdData

func CleanEtcdData(ctx context.Context, namespace, name string) error

CleanEtcdData use kubectl to clean up all data in etcd.

func GetFrontendServiceIngressIP

func GetFrontendServiceIngressIP(ctx context.Context, k8sClient client.Client, namespace, name string) (string, error)

GetFrontendServiceIngressIP returns the ingress IP of the frontend service. It is assumed that the service is of type LoadBalancer.

func GetPVCs

func GetPVCs(ctx context.Context, k8sClient client.Client, namespace, name string, kind greptimev1alpha1.ComponentKind) ([]corev1.PersistentVolumeClaim, error)

GetPVCs returns the PVCs of the datanodes.

func GetPhase

func GetPhase(ctx context.Context, k8sClient client.Client, namespace, name string, obj client.Object) (greptimev1alpha1.Phase, error)

GetPhase returns the phase of the GreptimeDBCluster or GreptimeDBStandalone.

func LoadGreptimeCRDFromFile

func LoadGreptimeCRDFromFile(inputFile string, obj client.Object) error

LoadGreptimeCRDFromFile loads GreptimeCRD from the input yaml file.

func RunSQLTest

func RunSQLTest(ctx context.Context, frontendIngressIP string, isDistributed bool) error

RunSQLTest runs the sql test on the frontend ingress IP.

Types

This section is empty.

Jump to

Keyboard shortcuts

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