utils

package
v0.1.0-alpha.27 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 17 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 KillPortForwardProcess

func KillPortForwardProcess()

KillPortForwardProcess kills the port forwarding process.

func LoadGreptimeCRDFromFile

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

LoadGreptimeCRDFromFile loads GreptimeCRD from the input yaml file.

func PortForward

func PortForward(ctx context.Context, namespace, serviceName string, sourcePort int) (string, error)

PortForward uses kubectl to port forward the service to a local random available port.

func RunFlowTest

func RunFlowTest(ctx context.Context, frontendAddr string) error

RunFlowTest runs the greptimedb flow tests on the frontend ingress IP.

func RunSQLTest

func RunSQLTest(ctx context.Context, frontendAddr 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