Documentation ¶
Index ¶
- Constants
- func ApplyYamlWithKubectl(path, namespace string) error
- func DecoratePodForGangScheduling(placeholderTimeout int, schedulingStyle string, taskGroupName string, ...) *v1.Pod
- func GetConfigMapObj(yamlPath string) (*v1.ConfigMap, error)
- func GetPodObj(yamlPath string) (*v1.Pod, error)
- func GetPodsTotalRequests(podList *v1.PodList) (reqs v1.ResourceList)
- func GetSecretObj(yamlPath string) (*v1.Secret, error)
- func GetWorkerNodes(nodes v1.NodeList) []v1.Node
- func InitJobConfig(conf JobConfig) (*batchv1.Job, error)
- func InitPersistentVolume(conf PvConfig) (*v1.PersistentVolume, error)
- func InitPersistentVolumeClaim(conf PvcConfig) (*v1.PersistentVolumeClaim, error)
- func InitSleepPod(conf SleepPodConfig) (*v1.Pod, error)
- func InitStorageClass(conf ScConfig) (*storagev1.StorageClass, error)
- func InitTaskGroup(conf SleepPodConfig, taskGroupName string, parallelism int32) []*interfaces.TaskGroup
- func InitTaskGroups(conf SleepPodConfig, mainTaskGroupName, secondTaskGroupName string, ...) []*interfaces.TaskGroup
- func InitTestJob(jobName string, parallelism, completions int32, pod *v1.Pod) *batchv1.Job
- func InitTestPod(conf TestPodConfig) (*v1.Pod, error)
- func IsComputeNode(node *v1.Node) bool
- func IsMasterNode(node *v1.Node) bool
- func LogNamespaceInfo(ns string) error
- func ObserveConfigMapInformerUpdateAfterAction(action func())
- func ObserveEventAfterAction(c clientset.Interface, ns string, eventPredicate func(*v1.Event) bool, ...) (bool, error)
- func PodAnnotationToMap(annotations *PodAnnotation) (map[string]string, error)
- func ScheduleFailureEvent(podName string) func(*v1.Event) bool
- func ScheduleSuccessEvent(ns, podName, nodeName string) func(*v1.Event) bool
- func SetPortForwarder(req PortForwardAPodRequest, dialer httpstream.Dialer, ports []string) error
- type Action
- type AllowPreemptOpted
- type EventHandler
- type JobConfig
- type KubeCtl
- func (k *KubeCtl) ConfigMapExists(name string, namespace string) (bool, error)
- func (k *KubeCtl) CreateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
- func (k *KubeCtl) CreateClusterRoleBinding(roleName string, role string, namespace string, serviceAccount string) (*authv1.ClusterRoleBinding, error)
- func (k *KubeCtl) CreateConfigMap(cMap *v1.ConfigMap, namespace string) (*v1.ConfigMap, error)
- func (k *KubeCtl) CreateConfigMaps(namespace string, cMap *v1.ConfigMap) (*v1.ConfigMap, error)
- func (k *KubeCtl) CreateCronJob(cronJob *batchv1.CronJob, namespace string) (*batchv1.CronJob, error)
- func (k *KubeCtl) CreateDaemonSet(daemonSet *appsv1.DaemonSet, namespace string) (*appsv1.DaemonSet, error)
- func (k *KubeCtl) CreateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
- func (k *KubeCtl) CreateJob(job *batchv1.Job, namespace string) (*batchv1.Job, error)
- func (k *KubeCtl) CreateNamespace(namespace string, annotations map[string]string) (*v1.Namespace, error)
- func (k *KubeCtl) CreatePersistentVolume(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
- func (k *KubeCtl) CreatePersistentVolumeClaim(pvc *v1.PersistentVolumeClaim, ns string) (*v1.PersistentVolumeClaim, error)
- func (k *KubeCtl) CreatePod(pod *v1.Pod, namespace string) (*v1.Pod, error)
- func (k *KubeCtl) CreatePriorityClass(pc *schedulingv1.PriorityClass) (*schedulingv1.PriorityClass, error)
- func (k *KubeCtl) CreateReplicaSet(replicaSet *appsv1.ReplicaSet, namespace string) (*appsv1.ReplicaSet, error)
- func (k *KubeCtl) CreateSecret(secret *v1.Secret, namespace string) (*v1.Secret, error)
- func (k *KubeCtl) CreateService(service *v1.Service, namespace string) (*v1.Service, error)
- func (k *KubeCtl) CreateServiceAccount(accountName string, namespace string) (*v1.ServiceAccount, error)
- func (k *KubeCtl) CreateStatefulSet(stetafulSet *appsv1.StatefulSet, namespace string) (*appsv1.StatefulSet, error)
- func (k *KubeCtl) CreateStorageClass(sc *storagev1.StorageClass) (*storagev1.StorageClass, error)
- func (k *KubeCtl) CreateTestPodAction(pod *v1.Pod, namespace string) Action
- func (k *KubeCtl) DeleteClusterRole(roleName string) error
- func (k *KubeCtl) DeleteClusterRoleBindings(roleName string) error
- func (k *KubeCtl) DeleteConfigMap(cName string, namespace string) error
- func (k *KubeCtl) DeleteConfigMaps(namespace string, cMapName string) error
- func (k *KubeCtl) DeleteCronJob(name, namespace string) error
- func (k *KubeCtl) DeleteDaemonSet(name, namespace string) error
- func (k *KubeCtl) DeleteDeployment(name, namespace string) error
- func (k *KubeCtl) DeleteJob(jobName string, namespace string) error
- func (k *KubeCtl) DeleteNamespace(namespace string) error
- func (k *KubeCtl) DeletePVCs(namespace string) error
- func (k *KubeCtl) DeletePVs(namespace string) error
- func (k *KubeCtl) DeletePersistentVolume(pvName string) error
- func (k *KubeCtl) DeletePersistentVolumeClaim(pvcName string, namespace string) error
- func (k *KubeCtl) DeletePod(podName string, namespace string) error
- func (k *KubeCtl) DeletePodAnnotation(pod *v1.Pod, namespace, annotation string) (*v1.Pod, error)
- func (k *KubeCtl) DeletePodGracefully(podName string, namespace string) error
- func (k *KubeCtl) DeletePods(namespace string) error
- func (k *KubeCtl) DeletePriorityClass(priorityClassName string) error
- func (k *KubeCtl) DeleteReplicaSet(name, namespace string) error
- func (k *KubeCtl) DeleteServiceAccount(accountName string, namespace string) error
- func (k *KubeCtl) DeleteStatefulSet(name, namespace string) error
- func (k *KubeCtl) DeleteStorageClass(scName string) error
- func (k *KubeCtl) DeleteWorkloadAndPods(objectName string, wlType WorkloadType, namespace string)
- func (k *KubeCtl) DescribeNode(node v1.Node) error
- func (k *KubeCtl) GetClient() *kubernetes.Clientset
- func (k *KubeCtl) GetConfigMap(name string, namespace string) (*v1.ConfigMap, error)
- func (k *KubeCtl) GetConfigMaps(namespace string, cMapName string) (*v1.ConfigMap, error)
- func (k *KubeCtl) GetDaemonSet(name, namespace string) (*appsv1.DaemonSet, error)
- func (k *KubeCtl) GetDeployment(name, namespace string) (*appsv1.Deployment, error)
- func (k *KubeCtl) GetEvents(namespace string) (*v1.EventList, error)
- func (k *KubeCtl) GetJobNamesFromNS(namespace string) ([]string, error)
- func (k *KubeCtl) GetJobs(namespace string) (*batchv1.JobList, error)
- func (k *KubeCtl) GetKubeConfig() (*rest.Config, error)
- func (k *KubeCtl) GetNodes() (*v1.NodeList, error)
- func (k *KubeCtl) GetNodesAvailRes(nodes v1.NodeList) map[string]v1.ResourceList
- func (k *KubeCtl) GetNodesCapacity(nodes v1.NodeList) map[string]v1.ResourceList
- func (k *KubeCtl) GetPersistentVolume(name string) (*v1.PersistentVolume, error)
- func (k *KubeCtl) GetPod(name, namespace string) (*v1.Pod, error)
- func (k *KubeCtl) GetPodLogs(podName string, namespace string, containerName string) ([]byte, error)
- func (k *KubeCtl) GetPodNamesFromNS(namespace string) ([]string, error)
- func (k *KubeCtl) GetPods(namespace string) (*v1.PodList, error)
- func (k *KubeCtl) GetPodsByOptions(options metav1.ListOptions) (*v1.PodList, error)
- func (k *KubeCtl) GetPvNameListFromNs(namespace string) ([]string, error)
- func (k *KubeCtl) GetPvcNameListFromNs(namespace string) ([]string, error)
- func (k *KubeCtl) GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error)
- func (k *KubeCtl) GetReplicaSets(namespace string) (*appsv1.ReplicaSetList, error)
- func (k *KubeCtl) GetSchedulerPod() (string, error)
- func (k *KubeCtl) GetService(serviceName string, namespace string) (*v1.Service, error)
- func (k *KubeCtl) GetStatefulSet(name, namespace string) (*appsv1.StatefulSet, error)
- func (k *KubeCtl) IsNodeLabelExists(name, key string) (bool, error)
- func (k *KubeCtl) KillPortForwardProcess()
- func (k *KubeCtl) ListPlaceholders(namespace string, podPrefix string) ([]v1.Pod, error)
- func (k *KubeCtl) ListPods(namespace string, selector string) (*v1.PodList, error)
- func (k *KubeCtl) ListPodsByFieldSelector(namespace string, selector string) (*v1.PodList, error)
- func (k *KubeCtl) ListPodsByLabelSelector(namespace string, selector string) (*v1.PodList, error)
- func (k *KubeCtl) PodScheduled(podNamespace, podName string) wait.ConditionFunc
- func (k *KubeCtl) PodUnschedulable(podNamespace, podName string) wait.ConditionFunc
- func (k *KubeCtl) PortForwardPod(req PortForwardAPodRequest) error
- func (k *KubeCtl) PortForwardYkSchedulerPod() error
- func (k *KubeCtl) RemoveNodeLabel(name, key, value string) error
- func (k *KubeCtl) SetClient() error
- func (k *KubeCtl) SetNodeLabel(name, key, value string) error
- func (k *KubeCtl) StartConfigMapInformer(namespace string, stopChan <-chan struct{}, ...) error
- func (k *KubeCtl) TaintNode(name, key, val string, effect v1.TaintEffect) error
- func (k *KubeCtl) TaintNodes(names []string, key, val string, effect v1.TaintEffect) error
- func (k *KubeCtl) TearDownNamespace(namespace string) error
- func (k *KubeCtl) UntaintNode(name, key string) error
- func (k *KubeCtl) UntaintNodes(names []string, key string) error
- func (k *KubeCtl) UpdateConfigMap(cMap *v1.ConfigMap, namespace string) (*v1.ConfigMap, error)
- func (k *KubeCtl) UpdateConfigMaps(namespace string, cMap *v1.ConfigMap) (*v1.ConfigMap, error)
- func (k *KubeCtl) UpdateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
- func (k *KubeCtl) UpdateNamespace(namespace string, annotations map[string]string) (*v1.Namespace, error)
- func (k *KubeCtl) UpdatePod(pod *v1.Pod, namespace string) (*v1.Pod, error)
- func (k *KubeCtl) UpdatePodWithAnnotation(pod *v1.Pod, namespace, annotationKey, annotationVal string) (*v1.Pod, error)
- func (k *KubeCtl) WaitForJobPods(namespace string, jobName string, numPods int, timeout time.Duration) error
- func (k *KubeCtl) WaitForJobPodsCreated(namespace string, jobName string, numPods int, timeout time.Duration) error
- func (k *KubeCtl) WaitForJobPodsRunning(namespace string, jobName string, numPods int, timeout time.Duration) error
- func (k *KubeCtl) WaitForJobPodsSucceeded(namespace string, jobName string, numPods int, timeout time.Duration) error
- func (k *KubeCtl) WaitForJobTerminated(namespace string, jobName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPersistentVolumeAvailable(name string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPersistentVolumeClaimPresent(namespace string, name string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPlaceholders(namespace string, podPrefix string, numPods int, timeout time.Duration, ...) error
- func (k *KubeCtl) WaitForPlaceholdersStableState(namespace string, podPrefix string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodBySelector(namespace string, selector string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodBySelectorRunning(namespace string, selector string, timeout int) error
- func (k *KubeCtl) WaitForPodBySelectorSucceeded(namespace string, selector string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodCount(namespace string, wanted int, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodEvent(namespace string, podName string, expectedReason string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodFailed(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodPending(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodRunning(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodScheduled(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodStateStable(namespace string, podName string, timeout time.Duration) (v1.PodPhase, error)
- func (k *KubeCtl) WaitForPodSucceeded(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodTerminated(namespace string, podName string, timeout time.Duration) error
- func (k *KubeCtl) WaitForPodUnschedulable(pod *v1.Pod, timeout time.Duration) error
- func (k *KubeCtl) WaitForSchedulerAfterAction(action Action, ns, podName string, expectSuccess bool) (bool, error)
- func (k *KubeCtl) WaitForServiceAccountPresent(namespace string, svcAcctName string, timeout time.Duration) error
- type PodAnnotation
- type PortForwardAPodRequest
- type PvConfig
- type PvcConfig
- type ScConfig
- type SleepPodConfig
- type TestJobConfig
- type TestPodConfig
- type WorkloadType
Constants ¶
const ( Deployment = "Deployment" StatefulSet = "StatefulSet" DaemonSet = "DaemonSet" ReplicaSet = "ReplicaSet" Job = "Job" CronJob = "CronJob" )
const ( TaskGroupName = constants.DomainYuniKorn + "task-group-name" TaskGroups = constants.DomainYuniKorn + "task-groups" PlaceHolder = constants.DomainYuniKorn + "placeholder" SchedulingPolicyParams = constants.DomainYuniKorn + "schedulingPolicyParameters" MaxCPU = constants.DomainYuniKorn + "namespace.max.cpu" MaxMem = constants.DomainYuniKorn + "namespace.max.memory" )
const (
LocalTypePv string = "Local"
)
Variables ¶
This section is empty.
Functions ¶
func ApplyYamlWithKubectl ¶
func DecoratePodForGangScheduling ¶ added in v1.1.0
func GetPodsTotalRequests ¶ added in v1.2.0
func GetPodsTotalRequests(podList *v1.PodList) (reqs v1.ResourceList)
Sums up current resource usage in a list of pods. Non-running pods are filtered out.
func InitPersistentVolume ¶ added in v1.4.0
func InitPersistentVolume(conf PvConfig) (*v1.PersistentVolume, error)
func InitPersistentVolumeClaim ¶ added in v1.4.0
func InitPersistentVolumeClaim(conf PvcConfig) (*v1.PersistentVolumeClaim, error)
func InitSleepPod ¶ added in v1.1.0
func InitSleepPod(conf SleepPodConfig) (*v1.Pod, error)
TestPodConfig template for sleepPods
func InitStorageClass ¶ added in v1.4.0
func InitStorageClass(conf ScConfig) (*storagev1.StorageClass, error)
func InitTaskGroup ¶ added in v1.3.0
func InitTaskGroup(conf SleepPodConfig, taskGroupName string, parallelism int32) []*interfaces.TaskGroup
func InitTaskGroups ¶ added in v1.1.0
func InitTaskGroups(conf SleepPodConfig, mainTaskGroupName, secondTaskGroupName string, parallelism int) []*interfaces.TaskGroup
func InitTestJob ¶ added in v1.1.0
func InitTestPod ¶ added in v1.1.0
func InitTestPod(conf TestPodConfig) (*v1.Pod, error)
func IsComputeNode ¶ added in v1.3.0
func IsMasterNode ¶ added in v1.3.0
func LogNamespaceInfo ¶ added in v1.2.0
func ObserveConfigMapInformerUpdateAfterAction ¶ added in v1.4.0
func ObserveConfigMapInformerUpdateAfterAction(action func())
func ObserveEventAfterAction ¶
func ObserveEventAfterAction(c clientset.Interface, ns string, eventPredicate func(*v1.Event) bool, action Action) (bool, error)
observeEventAfterAction returns true if an event matching the predicate was emitted from the system after performing the supplied action.
func PodAnnotationToMap ¶ added in v1.1.0
func PodAnnotationToMap(annotations *PodAnnotation) (map[string]string, error)
Pod.ObjectMeta.Annotations expect map[string]string. Converts struct to map[string]string
func ScheduleSuccessEvent ¶
func SetPortForwarder ¶
func SetPortForwarder(req PortForwardAPodRequest, dialer httpstream.Dialer, ports []string) error
Types ¶
type AllowPreemptOpted ¶ added in v1.4.0
type AllowPreemptOpted int
const ( NotConfig AllowPreemptOpted = iota Allow Deny )
type EventHandler ¶ added in v1.4.0
type EventHandler struct {
// contains filtered or unexported fields
}
func (*EventHandler) OnAdd ¶ added in v1.4.0
func (e *EventHandler) OnAdd(_ interface{}, _ bool)
func (*EventHandler) OnDelete ¶ added in v1.4.0
func (e *EventHandler) OnDelete(_ interface{})
func (*EventHandler) OnUpdate ¶ added in v1.4.0
func (e *EventHandler) OnUpdate(_, _ interface{})
func (*EventHandler) WaitForUpdate ¶ added in v1.4.0
func (e *EventHandler) WaitForUpdate(timeout time.Duration) bool
type JobConfig ¶ added in v1.1.0
type JobConfig struct { Parallelism int32 Name string Namespace string PodConfig TestPodConfig }
type KubeCtl ¶
type KubeCtl struct {
// contains filtered or unexported fields
}
func (*KubeCtl) ConfigMapExists ¶ added in v1.2.0
func (*KubeCtl) CreateClusterRole ¶ added in v1.4.0
func (k *KubeCtl) CreateClusterRole(clusterRole *rbacv1.ClusterRole) (*rbacv1.ClusterRole, error)
func (*KubeCtl) CreateClusterRoleBinding ¶
func (*KubeCtl) CreateConfigMap ¶
func (*KubeCtl) CreateConfigMaps ¶
func (*KubeCtl) CreateCronJob ¶ added in v1.3.0
func (*KubeCtl) CreateDaemonSet ¶ added in v1.3.0
func (*KubeCtl) CreateDeployment ¶ added in v1.2.0
func (k *KubeCtl) CreateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
func (*KubeCtl) CreateNamespace ¶
func (k *KubeCtl) CreateNamespace(namespace string, annotations map[string]string) (*v1.Namespace, error)
Func to create a namespace provided a name
func (*KubeCtl) CreatePersistentVolume ¶ added in v1.4.0
func (k *KubeCtl) CreatePersistentVolume(pv *v1.PersistentVolume) (*v1.PersistentVolume, error)
func (*KubeCtl) CreatePersistentVolumeClaim ¶ added in v1.4.0
func (k *KubeCtl) CreatePersistentVolumeClaim(pvc *v1.PersistentVolumeClaim, ns string) (*v1.PersistentVolumeClaim, error)
func (*KubeCtl) CreatePriorityClass ¶ added in v1.2.0
func (k *KubeCtl) CreatePriorityClass(pc *schedulingv1.PriorityClass) (*schedulingv1.PriorityClass, error)
func (*KubeCtl) CreateReplicaSet ¶ added in v1.3.0
func (k *KubeCtl) CreateReplicaSet(replicaSet *appsv1.ReplicaSet, namespace string) (*appsv1.ReplicaSet, error)
func (*KubeCtl) CreateSecret ¶
func (*KubeCtl) CreateService ¶ added in v1.4.0
func (*KubeCtl) CreateServiceAccount ¶
func (*KubeCtl) CreateStatefulSet ¶ added in v1.3.0
func (k *KubeCtl) CreateStatefulSet(stetafulSet *appsv1.StatefulSet, namespace string) (*appsv1.StatefulSet, error)
func (*KubeCtl) CreateStorageClass ¶ added in v1.4.0
func (k *KubeCtl) CreateStorageClass(sc *storagev1.StorageClass) (*storagev1.StorageClass, error)
func (*KubeCtl) CreateTestPodAction ¶
CreateTestPodAction returns a closure that creates a pause pod upon invocation.
func (*KubeCtl) DeleteClusterRole ¶ added in v1.4.0
func (*KubeCtl) DeleteClusterRoleBindings ¶
func (*KubeCtl) DeleteConfigMap ¶
func (*KubeCtl) DeleteConfigMaps ¶
func (*KubeCtl) DeleteCronJob ¶ added in v1.3.0
func (*KubeCtl) DeleteDaemonSet ¶ added in v1.3.0
func (*KubeCtl) DeleteDeployment ¶ added in v1.2.0
func (*KubeCtl) DeleteNamespace ¶
func (*KubeCtl) DeletePVCs ¶ added in v1.4.0
func (*KubeCtl) DeletePersistentVolume ¶ added in v1.4.0
func (*KubeCtl) DeletePersistentVolumeClaim ¶ added in v1.4.0
func (*KubeCtl) DeletePodAnnotation ¶
func (*KubeCtl) DeletePodGracefully ¶
func (*KubeCtl) DeletePods ¶ added in v1.3.0
func (*KubeCtl) DeletePriorityClass ¶ added in v1.2.0
func (*KubeCtl) DeleteReplicaSet ¶ added in v1.3.0
func (*KubeCtl) DeleteServiceAccount ¶
func (*KubeCtl) DeleteStatefulSet ¶ added in v1.3.0
func (*KubeCtl) DeleteStorageClass ¶ added in v1.4.0
func (*KubeCtl) DeleteWorkloadAndPods ¶ added in v1.3.0
func (k *KubeCtl) DeleteWorkloadAndPods(objectName string, wlType WorkloadType, namespace string)
func (*KubeCtl) DescribeNode ¶ added in v1.2.0
DescribeNode Describe Node
func (*KubeCtl) GetClient ¶
func (k *KubeCtl) GetClient() *kubernetes.Clientset
func (*KubeCtl) GetConfigMap ¶
func (*KubeCtl) GetConfigMaps ¶
func (*KubeCtl) GetDaemonSet ¶ added in v1.3.0
func (*KubeCtl) GetDeployment ¶ added in v1.2.0
func (k *KubeCtl) GetDeployment(name, namespace string) (*appsv1.Deployment, error)
func (*KubeCtl) GetJobNamesFromNS ¶ added in v1.2.0
func (*KubeCtl) GetNodesAvailRes ¶ added in v1.2.0
GetNodesAvailRes Returns map of nodeName to list of available resource (memory and cpu only) amounts.
func (*KubeCtl) GetNodesCapacity ¶ added in v1.3.0
func (*KubeCtl) GetPersistentVolume ¶ added in v1.4.0
func (k *KubeCtl) GetPersistentVolume(name string) (*v1.PersistentVolume, error)
func (*KubeCtl) GetPodLogs ¶ added in v1.2.0
func (*KubeCtl) GetPodNamesFromNS ¶
func (*KubeCtl) GetPodsByOptions ¶ added in v1.2.0
func (*KubeCtl) GetPvNameListFromNs ¶ added in v1.4.0
func (*KubeCtl) GetPvcNameListFromNs ¶ added in v1.4.0
func (*KubeCtl) GetReplicaSet ¶ added in v1.3.0
func (k *KubeCtl) GetReplicaSet(name, namespace string) (*appsv1.ReplicaSet, error)
func (*KubeCtl) GetReplicaSets ¶ added in v1.3.0
func (k *KubeCtl) GetReplicaSets(namespace string) (*appsv1.ReplicaSetList, error)
func (*KubeCtl) GetSchedulerPod ¶
func (*KubeCtl) GetService ¶
func (*KubeCtl) GetStatefulSet ¶ added in v1.3.0
func (k *KubeCtl) GetStatefulSet(name, namespace string) (*appsv1.StatefulSet, error)
func (*KubeCtl) IsNodeLabelExists ¶ added in v1.3.0
func (*KubeCtl) KillPortForwardProcess ¶
func (k *KubeCtl) KillPortForwardProcess()
func (*KubeCtl) ListPlaceholders ¶ added in v1.4.0
func (*KubeCtl) ListPods ¶
Returns the list of currently scheduled or running pods in `namespace` with the given selector
func (*KubeCtl) ListPodsByFieldSelector ¶ added in v1.2.0
Returns the list of currently scheduled or running pods in `namespace` with the given selector
func (*KubeCtl) ListPodsByLabelSelector ¶ added in v1.4.0
Returns the list of pods in `namespace` with the given label selector
func (*KubeCtl) PodScheduled ¶
func (k *KubeCtl) PodScheduled(podNamespace, podName string) wait.ConditionFunc
PodScheduled checks if the pod has been scheduled
func (*KubeCtl) PodUnschedulable ¶
func (k *KubeCtl) PodUnschedulable(podNamespace, podName string) wait.ConditionFunc
PodUnschedulable returns a condition function that returns true if the given pod gets unschedulable status.
func (*KubeCtl) PortForwardPod ¶
func (k *KubeCtl) PortForwardPod(req PortForwardAPodRequest) error
func (*KubeCtl) PortForwardYkSchedulerPod ¶
func (*KubeCtl) RemoveNodeLabel ¶ added in v1.3.0
func (*KubeCtl) SetNodeLabel ¶ added in v1.3.0
func (*KubeCtl) StartConfigMapInformer ¶ added in v1.2.0
func (k *KubeCtl) StartConfigMapInformer(namespace string, stopChan <-chan struct{}, eventHandler cache.ResourceEventHandler) error
func (*KubeCtl) TaintNode ¶ added in v1.3.0
func (k *KubeCtl) TaintNode(name, key, val string, effect v1.TaintEffect) error
func (*KubeCtl) TaintNodes ¶ added in v1.4.0
func (*KubeCtl) TearDownNamespace ¶
func (*KubeCtl) UntaintNode ¶ added in v1.3.0
func (*KubeCtl) UntaintNodes ¶ added in v1.4.0
func (*KubeCtl) UpdateConfigMap ¶
func (*KubeCtl) UpdateConfigMaps ¶
func (*KubeCtl) UpdateDeployment ¶ added in v1.3.0
func (k *KubeCtl) UpdateDeployment(deployment *appsv1.Deployment, namespace string) (*appsv1.Deployment, error)
func (*KubeCtl) UpdateNamespace ¶ added in v1.4.0
func (k *KubeCtl) UpdateNamespace(namespace string, annotations map[string]string) (*v1.Namespace, error)
Func to update a namespace with annotations
func (*KubeCtl) UpdatePodWithAnnotation ¶
func (*KubeCtl) WaitForJobPods ¶ added in v1.2.0
func (*KubeCtl) WaitForJobPodsCreated ¶ added in v1.1.0
func (*KubeCtl) WaitForJobPodsRunning ¶ added in v1.1.0
func (*KubeCtl) WaitForJobPodsSucceeded ¶ added in v1.1.0
func (*KubeCtl) WaitForJobTerminated ¶ added in v1.2.0
func (*KubeCtl) WaitForPersistentVolumeAvailable ¶ added in v1.4.0
func (*KubeCtl) WaitForPersistentVolumeClaimPresent ¶ added in v1.4.0
func (*KubeCtl) WaitForPlaceholders ¶ added in v1.1.0
func (*KubeCtl) WaitForPlaceholdersStableState ¶ added in v1.3.0
func (k *KubeCtl) WaitForPlaceholdersStableState(namespace string, podPrefix string, timeout time.Duration) error
WaitForPlaceholdersStableState used when the expected state of the placeholders cannot be properly determined in advance or not needed. Returns when the phase of pods does not change three times in a row.
func (*KubeCtl) WaitForPodBySelector ¶ added in v1.2.0
func (k *KubeCtl) WaitForPodBySelector(namespace string, selector string, timeout time.Duration) error
Wait up to timeout seconds for a pod in 'namespace' with given 'selector' to exist
func (*KubeCtl) WaitForPodBySelectorRunning ¶
Wait up to timeout seconds for all pods in 'namespace' with given 'selector' to enter running state. Returns an error if no pods are found or not all discovered pods enter running state.
func (*KubeCtl) WaitForPodBySelectorSucceeded ¶ added in v1.4.0
func (k *KubeCtl) WaitForPodBySelectorSucceeded(namespace string, selector string, timeout time.Duration) error
Wait for all pods in 'namespace' with given 'selector' to enter succeeded state. Returns an error if no pods are found or not all discovered pods enter succeeded state.
func (*KubeCtl) WaitForPodCount ¶ added in v1.2.0
func (*KubeCtl) WaitForPodEvent ¶ added in v1.1.0
func (*KubeCtl) WaitForPodFailed ¶
func (*KubeCtl) WaitForPodPending ¶
func (*KubeCtl) WaitForPodRunning ¶
Poll up to timeout seconds for pod to enter running state. Returns an error if the pod never enters the running state.
func (*KubeCtl) WaitForPodScheduled ¶
func (*KubeCtl) WaitForPodStateStable ¶ added in v1.3.0
func (*KubeCtl) WaitForPodSucceeded ¶
func (*KubeCtl) WaitForPodTerminated ¶
func (*KubeCtl) WaitForPodUnschedulable ¶
WaitForPodUnschedulable waits for a pod to fail scheduling and returns an error if it does not become unschedulable within the given timeout.
type PodAnnotation ¶ added in v1.1.0
type PortForwardAPodRequest ¶
type PortForwardAPodRequest struct { // Kube config RestConfig *rest.Config // Pod to port-forward traffic for Pod v1.Pod // Local port to expose traffic to pod's target port LocalPort int // Target port for the pod PodPort int // Streams to configure where to read/write input and output Streams genericclioptions.IOStreams // StopCh is the channel used to stop the port forward process StopCh <-chan struct{} // ReadyCh communicates when the tunnel is ready to receive traffic ReadyCh chan struct{} }
type SleepPodConfig ¶ added in v1.1.0
type TestJobConfig ¶ added in v1.1.0
type TestPodConfig ¶ added in v1.1.0
type TestPodConfig struct { Name string Namespace string Affinity *v1.Affinity Annotations *PodAnnotation Labels, NodeSelector map[string]string Resources *v1.ResourceRequirements RuntimeClassHandler *string Tolerations []v1.Toleration NodeName string Ports []v1.ContainerPort OwnerReferences []metav1.OwnerReference PriorityClassName string DeletionGracePeriodSeconds *int64 TopologySpreadConstraints []v1.TopologySpreadConstraint Image string RestartPolicy v1.RestartPolicy Command []string InitContainerSleepSecs int PvcName string PvName string VolumeName string }
type WorkloadType ¶ added in v1.3.0
type WorkloadType string