k8sutil

package
v3.1.0-beta3+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerInPod

func ContainerInPod(pod *v1.Pod, containerName string) *v1.Container

ContainerInPod returns a reference to a container object given its name in the given pod. Returns nil if the container does not exist in the given pod.

func EnvValueForContainer

func EnvValueForContainer(pod *v1.Pod, envName, containerName string) (string, error)

EnvValueForContainer returns the value of an env var set on a container within a pod. It only supports simple env values and not value references.

func FetchSecretValue

func FetchSecretValue(client *k8s.Clientset, secretName, dataKey, namespace string) (string, error)

FetchSecretValue fetches a specific secret value from the "data" object in a secret and returns the decoded value.

func PortByName

func PortByName(pod *v1.Pod, port string) *v1.ContainerPort

PortByName returns the first port instance with the given name among all of a pod's containers. Returns nil if no port name matches.

func PortByNumber

func PortByNumber(pod *v1.Pod, port int32) *v1.ContainerPort

PortByNumber returns the first port instance, regardless of whether it is TCP or UDP, with the given port number among all of a pod's containers. Returns nil if no port number matches.

Types

This section is empty.

Jump to

Keyboard shortcuts

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