Documentation ¶
Index ¶
- Variables
- func InitTestSchedulerWithOptions(t *testing.T, testCtx *testutils.TestContext, startScheduler bool, ...) *testutils.TestContext
- func MakePlacementPolicy(mode v1alpha1.EnforcementMode, targetSize intstr.IntOrString, ...) *v1alpha1.PlacementPolicy
- func NewDefaultSchedulerComponentConfig() (config.KubeSchedulerConfiguration, error)
- func PodScheduled(c kubernetes.Interface, podNamespace, podName string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NodeSelectorLabels = map[string]string{"node": "want"} PodSelectorLabels = map[string]string{"app": "nginx"} )
Functions ¶
func InitTestSchedulerWithOptions ¶
func InitTestSchedulerWithOptions( t *testing.T, testCtx *testutils.TestContext, startScheduler bool, opts ...scheduler.Option, ) *testutils.TestContext
InitTestSchedulerWithOptions initializes a test environment and creates a scheduler with default configuration and other options. TODO(Huang-Wei): refactor the same function in the upstream, and remove here.
func MakePlacementPolicy ¶
func MakePlacementPolicy(mode v1alpha1.EnforcementMode, targetSize intstr.IntOrString, action v1alpha1.Action, name, namespace string) *v1alpha1.PlacementPolicy
MakePlacementPolicy
func NewDefaultSchedulerComponentConfig ¶
func NewDefaultSchedulerComponentConfig() (config.KubeSchedulerConfiguration, error)
https://github.com/kubernetes-sigs/scheduler-plugins/blob/478a9cb0867c10821bfac3bf1a2be3434796af81/test/util/framework.go NewDefaultSchedulerComponentConfig returns a default scheduler cc object. We need this function due to k/k#102796 - default profile needs to built manually.
func PodScheduled ¶
func PodScheduled(c kubernetes.Interface, podNamespace, podName string) bool
PodScheduled returns true if a node is assigned to the given pod.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.