Documentation ¶
Index ¶
- func ContainerInPod(pod *v1.Pod, containerName string) *v1.Container
- func EnvValueForContainer(pod *v1.Pod, envName, containerName string) (string, error)
- func FetchSecretValue(client *k8s.Clientset, secretName, dataKey, namespace string) (string, error)
- func PortByName(pod *v1.Pod, port string) *v1.ContainerPort
- func PortByNumber(pod *v1.Pod, port int32) *v1.ContainerPort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerInPod ¶
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 ¶
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 ¶
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.