Documentation ¶
Index ¶
- func CreateKubeconfigFileForRestConfig(restConfig *rest.Config) ([]byte, error)
- func CreateSchedulerAppConfig(restCfg *rest.Config) (*schedulerappconfig.Config, error)
- func ExitAppWithError(code int, err error)
- func GenerateRandomString(length int) (string, error)
- func GetInstanceType(labels map[string]string) string
- func GetPodNames(pods []*corev1.Pod) []string
- func IsSystemPod(pod *corev1.Pod) bool
- func ListNodes(ctx context.Context, cl client.Client, filters ...api.NodeFilter) ([]corev1.Node, error)
- func ListPods(ctx context.Context, cl client.Client, namespace string, ...) ([]corev1.Pod, error)
- func NotYetScheduledPod(pod *corev1.Pod) bool
- func OnExit()
- func PodSchedulingFailed(pod *corev1.Pod) bool
- func WriteKubeConfig(kubeConfigPath string, kubeConfigBytes []byte) (string, error)
- type Exit
- type PodBuilder
- func (p *PodBuilder) AddLabel(key string, value string) *PodBuilder
- func (p *PodBuilder) Build() []*corev1.Pod
- func (p *PodBuilder) Count(count int) *PodBuilder
- func (p *PodBuilder) Labels(labels map[string]string) *PodBuilder
- func (p *PodBuilder) Name(name string) *PodBuilder
- func (p *PodBuilder) NominatedNodeName(nominatedNodeName string) *PodBuilder
- func (p *PodBuilder) SchedulerName(schedulerName string) *PodBuilder
- func (p *PodBuilder) Spec(spec corev1.PodSpec) *PodBuilder
- type ReferenceNodes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSchedulerAppConfig ¶
func CreateSchedulerAppConfig(restCfg *rest.Config) (*schedulerappconfig.Config, error)
func ExitAppWithError ¶
func GenerateRandomString ¶
func GetInstanceType ¶
func GetPodNames ¶
func IsSystemPod ¶
func ListPods ¶
func ListPods(ctx context.Context, cl client.Client, namespace string, filters ...api.PodFilter) ([]corev1.Pod, error)
ListPods will get all pods and apply the given filters to the pods in conjunction. If no filters are given, all pods are returned.
func NotYetScheduledPod ¶
NotYetScheduledPod is a PodFilter that returns true if the pod is not yet scheduled.
func PodSchedulingFailed ¶
PodSchedulingFailed is a PodFilter that returns true if the pod scheduling has failed.
Types ¶
type PodBuilder ¶
type PodBuilder struct {
// contains filtered or unexported fields
}
func NewPodBuilder ¶
func NewPodBuilder() *PodBuilder
func (*PodBuilder) AddLabel ¶
func (p *PodBuilder) AddLabel(key string, value string) *PodBuilder
func (*PodBuilder) Build ¶
func (p *PodBuilder) Build() []*corev1.Pod
func (*PodBuilder) Count ¶
func (p *PodBuilder) Count(count int) *PodBuilder
func (*PodBuilder) Labels ¶
func (p *PodBuilder) Labels(labels map[string]string) *PodBuilder
func (*PodBuilder) Name ¶
func (p *PodBuilder) Name(name string) *PodBuilder
func (*PodBuilder) NominatedNodeName ¶
func (p *PodBuilder) NominatedNodeName(nominatedNodeName string) *PodBuilder
func (*PodBuilder) SchedulerName ¶
func (p *PodBuilder) SchedulerName(schedulerName string) *PodBuilder
func (*PodBuilder) Spec ¶
func (p *PodBuilder) Spec(spec corev1.PodSpec) *PodBuilder
type ReferenceNodes ¶
func (ReferenceNodes) GetReferenceNode ¶
func (r ReferenceNodes) GetReferenceNode(instanceType string) (*corev1.Node, error)
Click to show internal directories.
Click to hide internal directories.