Documentation ¶
Index ¶
- Constants
- func BuildVariables(bv common.JobVariables) []api.EnvVar
- func CloseKubeClient(client *kubernetes.Clientset) bool
- func GetKubeClient(config common.Kubernetes) (*kubernetes.Clientset, error)
- func GetKubeClientConfig(config common.Kubernetes) (kubeConfig *restclient.Config, err error)
- func MakeRFC1123Compatible(name string) string
- func WaitForPodRunning(c *kubernetes.Clientset, pod *api.Pod) (api.PodPhase, error)
Constants ¶
View Source
const ( RFC1123NameMaximumLength = 63 RFC1123NotAllowedCharacters = "[^-a-z0-9]" RFC1123NotAllowedStartCharacters = "^[^a-z0-9]+" )
Variables ¶
This section is empty.
Functions ¶
func BuildVariables ¶
func BuildVariables(bv common.JobVariables) []api.EnvVar
buildVariables converts a common.BuildVariables into a list of kubernetes EnvVar objects
func CloseKubeClient ¶
func CloseKubeClient(client *kubernetes.Clientset) bool
func GetKubeClient ¶
func GetKubeClient(config common.Kubernetes) (*kubernetes.Clientset, error)
func GetKubeClientConfig ¶
func GetKubeClientConfig(config common.Kubernetes) (kubeConfig *restclient.Config, err error)
func WaitForPodRunning ¶
waitForPodRunning 使用 client 来监测 pod 何时到达 PodRunning 状态, 一旦到达 PodRunning,PodSucceeded,PodFailed 它将返回 PodPhase
对应 PodRunning 它还将等待,知道Pod 中所有的容器也都准备就绪。 如果调用 Pod 详情失败或达到超时,则会返回错误,可以配置超时和轮询值
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.