k8s

package
v0.0.0-...-5447720 Latest Latest
Warning

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

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

Documentation

Index

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 MakeRFC1123Compatible

func MakeRFC1123Compatible(name string) string

让名字满足 rfc1123 规范

func WaitForPodRunning

func WaitForPodRunning(c *kubernetes.Clientset, pod *api.Pod) (api.PodPhase, error)
waitForPodRunning 使用 client 来监测 pod 何时到达 PodRunning 状态,
一旦到达 PodRunning,PodSucceeded,PodFailed 它将返回 PodPhase

对应 PodRunning 它还将等待,知道Pod 中所有的容器也都准备就绪。 如果调用 Pod 详情失败或达到超时,则会返回错误,可以配置超时和轮询值

Types

This section is empty.

Jump to

Keyboard shortcuts

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