Documentation ¶
Index ¶
- func MakeNodesAndPods(labels map[string]string, existingPodsNum, allNodesNum int) (existingPods []*corev1.Pod, allNodes []*corev1.Node)
- func MakePG(name, namespace string, min int32, creationTime *time.Time, ...) *v1alpha1.PodGroup
- func MakePod(podName string, namespace string, memReq int64, cpuReq int64, priority int32, ...) *corev1.Pod
- func MustNewPodInfo(t testing.TB, pod *corev1.Pod) *framework.PodInfo
- func NewClientOrDie(cfg *rest.Config) client.Client
- func NewDefaultSchedulerComponentConfig() (config.KubeSchedulerConfiguration, error)
- func NewFakeClient(objs ...runtime.Object) (client.WithWatch, error)
- func NewFakeSharedLister(pods []*v1.Pod, nodes []*v1.Node) framework.SharedLister
- func NewFramework(ctx context.Context, fns []tf.RegisterPluginFunc, cfgs []config.PluginConfig, ...) (framework.Framework, error)
- func NewPodNominator(podLister listersv1.PodLister) framework.PodNominator
- func NominatedNodeName(pod *v1.Pod) string
- func PodNotExist(cs clientset.Interface, podNamespace, podName string) bool
- func PrintPods(t *testing.T, cs clientset.Interface, ns string)
- func UpdatePGStatus(pg *v1alpha1.PodGroup, phase v1alpha1.PodGroupPhase, occupiedBy string, ...) *v1alpha1.PodGroup
- func WithLimits(p *st.PodWrapper, resMap map[string]string, initContainer bool) *st.PodWrapper
- func WithRequests(p *st.PodWrapper, resMap map[string]string, initContainer bool) *st.PodWrapper
- type PodGroupWrapper
- func (p *PodGroupWrapper) MinMember(i int32) *PodGroupWrapper
- func (p *PodGroupWrapper) MinResources(resources map[v1.ResourceName]string) *PodGroupWrapper
- func (p *PodGroupWrapper) Name(s string) *PodGroupWrapper
- func (p *PodGroupWrapper) Namespace(s string) *PodGroupWrapper
- func (p *PodGroupWrapper) Obj() *v1alpha1.PodGroup
- func (p *PodGroupWrapper) Phase(phase v1alpha1.PodGroupPhase) *PodGroupWrapper
- func (p *PodGroupWrapper) Time(t time.Time) *PodGroupWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeNodesAndPods ¶ added in v0.19.8
func MustNewPodInfo ¶ added in v0.26.7
func NewClientOrDie ¶ added in v0.27.8
NewClientOrDie returns a generic controller-runtime client or panic upon any error. This function is used by integration tests.
func NewDefaultSchedulerComponentConfig ¶ added in v0.22.6
func NewDefaultSchedulerComponentConfig() (config.KubeSchedulerConfiguration, error)
NewDefaultSchedulerComponentConfig returns a default scheduler cc object. We need this function due to k/k#102796 - default profile needs to built manually.
func NewFakeClient ¶ added in v0.27.8
NewFakeClient returns a generic controller-runtime client with all given `objs` as internal runtime objects. It also registers core v1 scheme, this repo's v1alpha1 scheme and topologyv1alpha2 scheme. This function is used by unit tests.
func NewFakeSharedLister ¶ added in v0.19.8
func NewFramework ¶ added in v0.21.6
func NewFramework(ctx context.Context, fns []tf.RegisterPluginFunc, cfgs []config.PluginConfig, profileName string, opts ...runtime.Option) (framework.Framework, error)
NewFramework is a variant version of st.NewFramework - with extra PluginConfig slice as input.
func NewPodNominator ¶ added in v0.19.8
func NewPodNominator(podLister listersv1.PodLister) framework.PodNominator
NewPodNominator creates a nominator as a backing of framework.PodNominator. A podLister is passed in so as to check if the pod exists before adding its nominatedNode info.
func NominatedNodeName ¶ added in v0.19.8
NominatedNodeName returns nominated node name of a Pod.
func PodNotExist ¶ added in v0.23.9
PodNotExist returns true if the given pod does not exist.
func UpdatePGStatus ¶ added in v0.26.7
func WithLimits ¶ added in v0.24.9
func WithLimits(p *st.PodWrapper, resMap map[string]string, initContainer bool) *st.PodWrapper
WithLimits adds a new app or init container to the inner pod with a given resource map.
func WithRequests ¶ added in v0.24.9
func WithRequests(p *st.PodWrapper, resMap map[string]string, initContainer bool) *st.PodWrapper
WithRequests adds a new app or init container to the inner pod with a given resource map.
Types ¶
type PodGroupWrapper ¶ added in v0.27.8
func MakePodGroup ¶ added in v0.27.8
func MakePodGroup() *PodGroupWrapper
func (*PodGroupWrapper) MinMember ¶ added in v0.27.8
func (p *PodGroupWrapper) MinMember(i int32) *PodGroupWrapper
func (*PodGroupWrapper) MinResources ¶ added in v0.27.8
func (p *PodGroupWrapper) MinResources(resources map[v1.ResourceName]string) *PodGroupWrapper
func (*PodGroupWrapper) Name ¶ added in v0.27.8
func (p *PodGroupWrapper) Name(s string) *PodGroupWrapper
func (*PodGroupWrapper) Namespace ¶ added in v0.27.8
func (p *PodGroupWrapper) Namespace(s string) *PodGroupWrapper
func (*PodGroupWrapper) Obj ¶ added in v0.27.8
func (p *PodGroupWrapper) Obj() *v1alpha1.PodGroup
func (*PodGroupWrapper) Phase ¶ added in v0.27.8
func (p *PodGroupWrapper) Phase(phase v1alpha1.PodGroupPhase) *PodGroupWrapper
func (*PodGroupWrapper) Time ¶ added in v0.27.8
func (p *PodGroupWrapper) Time(t time.Time) *PodGroupWrapper