Documentation ¶
Overview ¶
Package kubehelpers contains helper functions for interacting with Kubernetes clusters and resources.
Index ¶
- func ConnectWithConfig(abspath string) (*kubernetes.Clientset, error)
- func ConnectWithinCluster() (*kubernetes.Clientset, error)
- func ContainerForName(name string, containers []corev1.Container) *corev1.Container
- func IsClientsSpecValid(clients *[]grpcv1.Client) (bool, error)
- func IsPSMTest(clients *[]grpcv1.Client) bool
- func IsProxiedTest(clients *[]grpcv1.Client) bool
- func UpdateConfigMapWithServerPort(port string, scenarioString string) (string, error)
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 ¶
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
IsClientsSpecValid checks if the given set of the client spec is valid.
func IsPSMTest ¶ added in v1.1.0
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
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
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.