Documentation ¶
Index ¶
- func BuildTestContainer(containerName, cpu, mem string) apiv1.Container
- func BuildTestPod(name, containerName, cpu, mem string, creatorObjectMeta *metav1.ObjectMeta, ...) *apiv1.Pod
- func BuildTestPolicy(containerName, minCpu, maxCpu, minMemory, maxMemory string) *vpa_types.PodResourcePolicy
- func BuildTestVerticalPodAutoscaler(...) *vpa_types.VerticalPodAutoscaler
- func Recommendation(containerName, cpu, mem string) *vpa_types.RecommendedPodResources
- type PodListerMock
- type PodsEvictionRestrictionMock
- type RecommenderAPIMock
- type RecommenderMock
- type VerticalPodAutoscalerListerMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildTestContainer ¶
BuildTestContainer creates container with specified resources
func BuildTestPod ¶
func BuildTestPod(name, containerName, cpu, mem string, creatorObjectMeta *metav1.ObjectMeta, creatorTypeMeta *metav1.TypeMeta) *apiv1.Pod
BuildTestPod creates a pod with specified resources.
func BuildTestPolicy ¶
func BuildTestPolicy(containerName, minCpu, maxCpu, minMemory, maxMemory string) *vpa_types.PodResourcePolicy
BuildTestPolicy creates ResourcesPolicy with specified constraints
func BuildTestVerticalPodAutoscaler ¶
func BuildTestVerticalPodAutoscaler(containerName, targetCpu, minCpu, maxCpu, targetMemory, minMemory, maxMemory string, selector string) *vpa_types.VerticalPodAutoscaler
BuildTestVerticalPodAutoscaler creates VerticalPodAutoscaler withs specified policy constraints
func Recommendation ¶
func Recommendation(containerName, cpu, mem string) *vpa_types.RecommendedPodResources
Recommendation creates Recommendation with specified container name and resources
Types ¶
type PodListerMock ¶
PodListerMock is a mock of PodLister
func (*PodListerMock) Pods ¶
func (m *PodListerMock) Pods(namespace string) v1.PodNamespaceLister
Pods is a mock implementation of PodLister.Pods
type PodsEvictionRestrictionMock ¶
PodsEvictionRestrictionMock is a mock of PodsEvictionRestriction
type RecommenderAPIMock ¶
RecommenderAPIMock is a mock of RecommenderAPI
func (*RecommenderAPIMock) GetRecommendation ¶
func (m *RecommenderAPIMock) GetRecommendation(spec *apiv1.PodSpec) (*vpa_types.RecommendedPodResources, error)
GetRecommendation is mock implementation of RecommenderAPI.GetRecommendation
type RecommenderMock ¶
RecommenderMock is a mock of Recommender
func (*RecommenderMock) Get ¶
func (m *RecommenderMock) Get(spec *apiv1.PodSpec) (*vpa_types.RecommendedPodResources, error)
Get is a mock implementation of Recommender.Get
type VerticalPodAutoscalerListerMock ¶
VerticalPodAutoscalerListerMock is a mock of VerticalPodAutoscalerLister
func (*VerticalPodAutoscalerListerMock) List ¶
func (m *VerticalPodAutoscalerListerMock) List(selector labels.Selector) (ret []*vpa_types.VerticalPodAutoscaler, err error)
List is a mock implementation of VerticalPodAutoscalerLister.List
func (*VerticalPodAutoscalerListerMock) VerticalPodAutoscalers ¶
func (m *VerticalPodAutoscalerListerMock) VerticalPodAutoscalers(namespace string) vpa_lister.VerticalPodAutoscalerNamespaceLister
VerticalPodAutoscalers is not implemented for this mock