Documentation ¶
Index ¶
- func CreateNodeInfoMap(pods []*corev1.Pod, nodes []*corev1.Node) map[string]*framework.NodeInfo
- func FakeConfigMap(namespace, name string, data map[string]string) *corev1.ConfigMap
- func FakeEventRecorder(bufferSize int) *record.FakeRecorder
- func FakePodWithSingleContainer(namespace, name, image string) *corev1.Pod
- func FakeSecret(namespace, name string, data map[string]string) *corev1.Secret
- func FakeService(namespace, name, clusterIP, protocol string, port int32) *corev1.Service
- func MakeBase64EncodeCert(t *testing.T) string
- func MakeCertString(t *testing.T) string
- func MakeNodesAndPods(labels, annotations map[string]string, existingPodsNum, allNodesNum int) (existingPods []*corev1.Pod, allNodes []*corev1.Node)
- func MakeTaskResource(namespace, name string, min int, creationTime *time.Time) *kusciaapisv1alpha1.TaskResource
- func NewFakeSharedLister(pods []*corev1.Pod, nodes []*corev1.Node) framework.SharedLister
- type FakeSharedLister
- func (f *FakeSharedLister) Get(nodeName string) (*framework.NodeInfo, error)
- func (f *FakeSharedLister) HavePodsWithAffinityList() ([]*framework.NodeInfo, error)
- func (f *FakeSharedLister) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error)
- func (f *FakeSharedLister) IsPVCUsedByPods(key string) bool
- func (f *FakeSharedLister) List() ([]*framework.NodeInfo, error)
- func (f *FakeSharedLister) NodeInfos() framework.NodeInfoLister
- func (f *FakeSharedLister) StorageInfos() framework.StorageInfoLister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNodeInfoMap ¶
func FakeConfigMap ¶
FakeConfigMap returns a configmap with the specified namespace, name and data.
func FakeEventRecorder ¶
func FakeEventRecorder(bufferSize int) *record.FakeRecorder
FakeEventRecorder returns an event recorder that can be used to capture events.
func FakePodWithSingleContainer ¶
FakePodWithSingleContainer returns a pod with the specified namespace and name, and having a single container with the specified image.
func FakeSecret ¶
FakeSecret returns a secret with the specified namespace, name and data.
func FakeService ¶
FakeService returns a service with the specified namespace and name and service info.
func MakeBase64EncodeCert ¶
func MakeCertString ¶
func MakeNodesAndPods ¶
func MakeTaskResource ¶
func MakeTaskResource(namespace, name string, min int, creationTime *time.Time) *kusciaapisv1alpha1.TaskResource
func NewFakeSharedLister ¶
Types ¶
type FakeSharedLister ¶
type FakeSharedLister struct {
// contains filtered or unexported fields
}
func (*FakeSharedLister) Get ¶
func (f *FakeSharedLister) Get(nodeName string) (*framework.NodeInfo, error)
func (*FakeSharedLister) HavePodsWithAffinityList ¶
func (f *FakeSharedLister) HavePodsWithAffinityList() ([]*framework.NodeInfo, error)
func (*FakeSharedLister) HavePodsWithRequiredAntiAffinityList ¶
func (f *FakeSharedLister) HavePodsWithRequiredAntiAffinityList() ([]*framework.NodeInfo, error)
func (*FakeSharedLister) IsPVCUsedByPods ¶
func (f *FakeSharedLister) IsPVCUsedByPods(key string) bool
func (*FakeSharedLister) NodeInfos ¶
func (f *FakeSharedLister) NodeInfos() framework.NodeInfoLister
func (*FakeSharedLister) StorageInfos ¶
func (f *FakeSharedLister) StorageInfos() framework.StorageInfoLister
Click to show internal directories.
Click to hide internal directories.