Documentation
¶
Index ¶
- Constants
- Variables
- func AddEdgeWorkerLabelAndAutonomyAnnotation(cliSet kubeclientset.Interface, node *corev1.Node, lVal, aVal string) (*corev1.Node, error)
- func DumpPod(client kubeclientset.Interface, pod *corev1.Pod, w io.Writer) error
- func GetOrCreateJoinTokenString(cliSet kubeclientset.Interface) (string, error)
- func RunJobAndCleanup(cliSet kubeclientset.Interface, job *batchv1.Job, ...) error
- func RunServantJobs(cliSet kubeclientset.Interface, waitServantJobTimeout time.Duration, ...) error
- type Builder
Constants ¶
View Source
const ( SystemNamespace = "kube-system" // DefaultWaitServantJobTimeout specifies the timeout value of waiting for the ServantJob to be succeeded DefaultWaitServantJobTimeout = time.Minute * 5 )
Variables ¶
View Source
var ( // PropagationPolicy defines the propagation policy used when deleting a resource PropagationPolicy = metav1.DeletePropagationBackground // CheckServantJobPeriod defines the time interval between two successive ServantJob status inspection CheckServantJobPeriod = time.Second * 10 )
Functions ¶
func GetOrCreateJoinTokenString ¶
func GetOrCreateJoinTokenString(cliSet kubeclientset.Interface) (string, error)
func RunJobAndCleanup ¶
func RunJobAndCleanup(cliSet kubeclientset.Interface, job *batchv1.Job, timeout, period time.Duration) error
RunJobAndCleanup runs the job, wait for it to be complete, and delete it
func RunServantJobs ¶
func RunServantJobs( cliSet kubeclientset.Interface, waitServantJobTimeout time.Duration, getJob func(nodeName string) (*batchv1.Job, error), nodeNames []string, ww io.Writer) error
RunServantJobs launch servant jobs on specified nodes and wait all jobs to finish. Succeed jobs will be deleted when finished. Failed jobs are preserved for diagnosis.
Types ¶
Click to show internal directories.
Click to hide internal directories.