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
- type FixedFakeCustomStore
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 ¶
type FixedFakeCustomStore ¶
type FixedFakeCustomStore struct {
cache.FakeCustomStore
}
FixedFakeCustomStore is necessary until we use a client-go version that includes https://github.com/kubernetes/kubernetes/pull/62406.
func (*FixedFakeCustomStore) Update ¶
func (f *FixedFakeCustomStore) Update(obj interface{}) error
Update calls the custom Update function if defined