util

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyImagePullSecret

func ApplyImagePullSecret(secret string, podspec apiv1.PodSpec) *apiv1.PodSpec

ApplyImagePullSecret applies image pull secret to the give pod spec. It's intentional not to check the existence of secret here. First, Kubernetes will set Pod status to "ImagePullBackOff" once kubelet failed to pull image so that users will know what's happening. Second, kubefaas no longer need to handle "secret not found" error when creating the environment deployment since kubelet will retry to pull image until successes.

func MergeContainer

func MergeContainer(dst *apiv1.Container, src *apiv1.Container) (*apiv1.Container, error)

MergeContainer returns merged container specs. Slices are merged, and return an error if the elements in the slice have name conflicts. Maps are merged, the value of map of dst container are overridden if the key is the same. The rest of fields of dst container are overridden directly.

func MergePodSpec

func MergePodSpec(imagePullPolicy apiv1.PullPolicy, srcPodSpec *apiv1.PodSpec, targetPodSpec *apiv1.PodSpec) (*apiv1.PodSpec, error)

func WaitTimeout

func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration)

Types

This section is empty.

Jump to

Keyboard shortcuts

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