util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyObject

func ApplyObject(client client.Client, object runtime.Object) error

ApplyObject applies k8s object

func BuildImage

func BuildImage(name, tag, fullImageIfNotEmpty string) string

BuildImage builds a image URL: ${fixture.Context.HubAddress}/${fixture.Context.DockerRepository}/$name:$tag or returns the fullImageIfNotEmpty if it's not empty

func FindPort

func FindPort(podName, component string, containers []corev1.Container) int32

FindPort get possible correct port when there are multiple ports

func GetNodeIPs

func GetNodeIPs(cli client.Client, namespace string, labels map[string]string) ([]string, error)

GetNodeIPs gets the IPs (or addresses) for nodes.

func GetServiceByMeta

func GetServiceByMeta(cli client.Client, svc *corev1.Service) (*corev1.Service, error)

GetServiceByMeta gets the service by its meta.

func PDAddress

func PDAddress(tc *v1alpha1.TidbCluster) string

PDAddress ...

func RenderTemplateFunc

func RenderTemplateFunc(tpl *template.Template, model interface{}) (string, error)

RenderTemplateFunc ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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