Documentation ¶
Index ¶
- type FakeCache
- func (f *FakeCache) AddNode(node *v1.Node) error
- func (f *FakeCache) AddPDB(pdb *policy.PodDisruptionBudget) error
- func (f *FakeCache) AddPod(pod *v1.Pod) error
- func (f *FakeCache) AssumePod(pod *v1.Pod) error
- func (f *FakeCache) FilteredList(filter schedulercache.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
- func (f *FakeCache) FinishBinding(pod *v1.Pod) error
- func (f *FakeCache) ForgetPod(pod *v1.Pod) error
- func (f *FakeCache) GetPod(pod *v1.Pod) (*v1.Pod, error)
- func (f *FakeCache) IsAssumedPod(pod *v1.Pod) (bool, error)
- func (f *FakeCache) IsUpToDate(*schedulercache.NodeInfo) bool
- func (f *FakeCache) List(s labels.Selector) ([]*v1.Pod, error)
- func (f *FakeCache) ListPDBs(selector labels.Selector) ([]*policy.PodDisruptionBudget, error)
- func (f *FakeCache) NodeTree() *schedulercache.NodeTree
- func (f *FakeCache) RemoveNode(node *v1.Node) error
- func (f *FakeCache) RemovePDB(pdb *policy.PodDisruptionBudget) error
- func (f *FakeCache) RemovePod(pod *v1.Pod) error
- func (f *FakeCache) Snapshot() *schedulercache.Snapshot
- func (f *FakeCache) UpdateNode(oldNode, newNode *v1.Node) error
- func (f *FakeCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error
- func (f *FakeCache) UpdatePDB(oldPDB, newPDB *policy.PodDisruptionBudget) error
- func (f *FakeCache) UpdatePod(oldPod, newPod *v1.Pod) error
- type FakeControllerLister
- type FakeNodeLister
- type FakePersistentVolumeClaimLister
- type FakePodLister
- type FakeReplicaSetLister
- type FakeServiceLister
- type FakeStatefulSetLister
- type TestGroup
- func (g TestGroup) Codec() runtime.Codec
- func (g TestGroup) ResourcePath(resource, namespace, name string) string
- func (g TestGroup) ResourcePathWithPrefix(prefix, resource, namespace, name string) string
- func (g TestGroup) SelfLink(resource, name string) string
- func (g TestGroup) SubResourcePath(resource, namespace, name, sub string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCache ¶
type FakeCache struct { AssumeFunc func(*v1.Pod) ForgetFunc func(*v1.Pod) IsAssumedPodFunc func(*v1.Pod) bool GetPodFunc func(*v1.Pod) *v1.Pod }
FakeCache is used for testing
func (*FakeCache) AddPDB ¶
func (f *FakeCache) AddPDB(pdb *policy.PodDisruptionBudget) error
AddPDB is a fake method for testing.
func (*FakeCache) FilteredList ¶
func (f *FakeCache) FilteredList(filter schedulercache.PodFilter, selector labels.Selector) ([]*v1.Pod, error)
FilteredList is a fake method for testing.
func (*FakeCache) FinishBinding ¶
FinishBinding is a fake method for testing.
func (*FakeCache) IsAssumedPod ¶
IsAssumedPod is a fake method for testing.
func (*FakeCache) IsUpToDate ¶ added in v1.11.6
func (f *FakeCache) IsUpToDate(*schedulercache.NodeInfo) bool
IsUpToDate is a fake method for testing
func (*FakeCache) NodeTree ¶
func (f *FakeCache) NodeTree() *schedulercache.NodeTree
NodeTree is a fake method for testing.
func (*FakeCache) RemoveNode ¶
RemoveNode is a fake method for testing.
func (*FakeCache) RemovePDB ¶
func (f *FakeCache) RemovePDB(pdb *policy.PodDisruptionBudget) error
RemovePDB is a fake method for testing.
func (*FakeCache) Snapshot ¶ added in v1.11.6
func (f *FakeCache) Snapshot() *schedulercache.Snapshot
Snapshot is a fake method for testing
func (*FakeCache) UpdateNode ¶
UpdateNode is a fake method for testing.
func (*FakeCache) UpdateNodeNameToInfoMap ¶
func (f *FakeCache) UpdateNodeNameToInfoMap(infoMap map[string]*schedulercache.NodeInfo) error
UpdateNodeNameToInfoMap is a fake method for testing.
type FakeControllerLister ¶
type FakeControllerLister []*v1.ReplicationController
FakeControllerLister implements ControllerLister on []v1.ReplicationController for test purposes.
func (FakeControllerLister) GetPodControllers ¶
func (f FakeControllerLister) GetPodControllers(pod *v1.Pod) (controllers []*v1.ReplicationController, err error)
GetPodControllers gets the ReplicationControllers that have the selector that match the labels on the given pod
func (FakeControllerLister) List ¶
func (f FakeControllerLister) List(labels.Selector) ([]*v1.ReplicationController, error)
List returns []v1.ReplicationController, the list of all ReplicationControllers.
type FakeNodeLister ¶
FakeNodeLister implements NodeLister on a []string for test purposes.
type FakePersistentVolumeClaimLister ¶
type FakePersistentVolumeClaimLister []*v1.PersistentVolumeClaim
FakePersistentVolumeClaimLister implements PersistentVolumeClaimLister on []*v1.PersistentVolumeClaim for test purposes.
func (FakePersistentVolumeClaimLister) List ¶
func (f FakePersistentVolumeClaimLister) List(selector labels.Selector) (ret []*v1.PersistentVolumeClaim, err error)
List returns not implemented error.
func (FakePersistentVolumeClaimLister) PersistentVolumeClaims ¶
func (f FakePersistentVolumeClaimLister) PersistentVolumeClaims(namespace string) corelisters.PersistentVolumeClaimNamespaceLister
PersistentVolumeClaims returns a FakePersistentVolumeClaimLister object.
type FakePodLister ¶
FakePodLister implements PodLister on an []v1.Pods for test purposes.
func (FakePodLister) FilteredList ¶
func (f FakePodLister) FilteredList(podFilter schedulercache.PodFilter, s labels.Selector) (selected []*v1.Pod, err error)
FilteredList returns pods matching a pod filter and a label selector.
type FakeReplicaSetLister ¶
type FakeReplicaSetLister []*apps.ReplicaSet
FakeReplicaSetLister implements ControllerLister on []extensions.ReplicaSet for test purposes.
func (FakeReplicaSetLister) GetPodReplicaSets ¶
func (f FakeReplicaSetLister) GetPodReplicaSets(pod *v1.Pod) (rss []*apps.ReplicaSet, err error)
GetPodReplicaSets gets the ReplicaSets that have the selector that match the labels on the given pod
type FakeServiceLister ¶
FakeServiceLister implements ServiceLister on []v1.Service for test purposes.
func (FakeServiceLister) GetPodServices ¶
GetPodServices gets the services that have the selector that match the labels on the given pod.
type FakeStatefulSetLister ¶
type FakeStatefulSetLister []*apps.StatefulSet
FakeStatefulSetLister implements ControllerLister on []apps.StatefulSet for testing purposes.
func (FakeStatefulSetLister) GetPodStatefulSets ¶
func (f FakeStatefulSetLister) GetPodStatefulSets(pod *v1.Pod) (sss []*apps.StatefulSet, err error)
GetPodStatefulSets gets the StatefulSets that have the selector that match the labels on the given pod.
type TestGroup ¶ added in v1.11.6
type TestGroup struct {
// contains filtered or unexported fields
}
TestGroup defines a api group for testing.
func (TestGroup) Codec ¶ added in v1.11.6
Codec returns the codec for the API version to test against, as set by the KUBE_TEST_API_TYPE env var.
func (TestGroup) ResourcePath ¶ added in v1.11.6
ResourcePath returns the appropriate path for the given resource, namespace and name. For example, this is of the form: /api/v1/namespaces/foo/pods/pod0 for v1.
func (TestGroup) ResourcePathWithPrefix ¶ added in v1.11.6
ResourcePathWithPrefix returns the appropriate path for the given prefix (watch, proxy, redirect, etc), resource, namespace and name. For ex, this is of the form: /api/v1/watch/namespaces/foo/pods/pod0 for v1.
func (TestGroup) SelfLink ¶ added in v1.11.6
SelfLink returns a self link that will appear to be for the version Version(). 'resource' should be the resource path, e.g. "pods" for the Pod type. 'name' should be empty for lists.
func (TestGroup) SubResourcePath ¶ added in v1.11.6
SubResourcePath returns the appropriate path for the given resource, namespace, name and subresource.