kubehelpers

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package kubehelpers contains helper functions for interacting with Kubernetes clusters and resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectWithConfig

func ConnectWithConfig(abspath string) (*kubernetes.Clientset, error)

ConnectWithConfig takes an absolute path to a kube config file which is used to connect to the Kubernetes API.

func ConnectWithinCluster

func ConnectWithinCluster() (*kubernetes.Clientset, error)

ConnectWithinCluster uses Kubernetes utility functions to locate the credentials within the cluster and connect to the API.

func ContainerForName

func ContainerForName(name string, containers []corev1.Container) *corev1.Container

ContainerForName accepts a string and a slice of containers. It returns a pointer to the container with a name that matches the string. If no names match, it returns nil.

func IsClientsSpecValid added in v1.1.0

func IsClientsSpecValid(clients *[]grpcv1.Client) (bool, error)

IsClientsSpecValid checks if the given set of the client spec is valid.

func IsPSMTest added in v1.1.0

func IsPSMTest(clients *[]grpcv1.Client) bool

IsPSMTest checks if a given LoadTest is a (proxied or proxyless) service mesh test. This test must be performed after validating the client specs.

func IsProxiedTest added in v1.1.0

func IsProxiedTest(clients *[]grpcv1.Client) bool

IsProxiedTest checks if the current test has a sidecar container specified. This check must be performed after validating the client specs.

func UpdateConfigMapWithServerPort added in v1.1.0

func UpdateConfigMapWithServerPort(port string, scenarioString string) (string, error)

UpdateConfigMapWithServerPort accepts a server port string and a scenarioString string. It returns an updated scenarioString with server port inserted. Currently only supports single scenario. TODO(wanlin31): update the function to support an array of scenarios

Types

This section is empty.

Jump to

Keyboard shortcuts

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