Documentation ¶
Index ¶
- Constants
- func DeleteOwnerReferencesForVPA(vpa *apis.KatalystVerticalPodAutoscaler, workload runtime.Object) error
- func GetVPARecResourceStatus(vpaPodResources []apis.PodResources, ...) ([]apis.RecommendedPodResources, []apis.RecommendedContainerResources, error)
- func GetVPAResourceStatusWithCurrent(vpa *apis.KatalystVerticalPodAutoscaler, pods []*core.Pod) ([]apis.PodResources, []apis.ContainerResources, error)
- func GetVPAResourceStatusWithRecommendation(vpa *apis.KatalystVerticalPodAutoscaler, ...) ([]apis.PodResources, []apis.ContainerResources, error)
- func PatchVPAConditions(ctx context.Context, vpaUpdater control.VPAUpdater, ...) error
- func PatchVPARecConditions(ctx context.Context, vpaRecUpdater control.VPARecommendationUpdater, ...) error
- func SetOwnerReferencesForVPA(vpa *apis.KatalystVerticalPodAutoscaler, workload runtime.Object) error
- func SetVPAConditions(vpa *apis.KatalystVerticalPodAutoscaler, ...) error
- func SetVPARecConditions(vpaRec *apis.VerticalPodAutoscalerRecommendation, ...) error
- func UpdateVPAConditions(ctx context.Context, vpaUpdater control.VPAUpdater, ...) error
Constants ¶
const ( VPARecConditionReasonUpdated = "Updated" VPARecConditionReasonIllegal = "Illegal" )
const ( VPAConditionReasonUpdated = "Updated" VPAConditionReasonCalculatedIllegal = "Illegal" VPAConditionReasonPodSpecUpdated = "PodSpecUpdated" VPAConditionReasonPodSpecNoUpdate = "PodSpecNoUpdate" )
Variables ¶
This section is empty.
Functions ¶
func DeleteOwnerReferencesForVPA ¶
func DeleteOwnerReferencesForVPA(vpa *apis.KatalystVerticalPodAutoscaler, workload runtime.Object) error
DeleteOwnerReferencesForVPA is used to parse from workload list, and clean up the runtime information from OwnerReference fields for vpa CR
func GetVPARecResourceStatus ¶
func GetVPARecResourceStatus(vpaPodResources []apis.PodResources, vpaContainerResources []apis.ContainerResources) ( []apis.RecommendedPodResources, []apis.RecommendedContainerResources, error)
GetVPARecResourceStatus updates resource recommendation results from vpa status to vpaRec status
func GetVPAResourceStatusWithCurrent ¶
func GetVPAResourceStatusWithCurrent(vpa *apis.KatalystVerticalPodAutoscaler, pods []*core.Pod) ([]apis.PodResources, []apis.ContainerResources, error)
GetVPAResourceStatusWithCurrent updates pod current resource results from vpaRec to vpa
func GetVPAResourceStatusWithRecommendation ¶
func GetVPAResourceStatusWithRecommendation(vpa *apis.KatalystVerticalPodAutoscaler, recPodResources []apis.RecommendedPodResources, recContainerResources []apis.RecommendedContainerResources) ([]apis.PodResources, []apis.ContainerResources, error)
GetVPAResourceStatusWithRecommendation updates resource recommendation results from vpaRec to vpa
func PatchVPAConditions ¶
func PatchVPAConditions( ctx context.Context, vpaUpdater control.VPAUpdater, vpa *apis.KatalystVerticalPodAutoscaler, conditionType apis.VerticalPodAutoscalerConditionType, conditionStatus core.ConditionStatus, reason, message string, ) error
PatchVPAConditions is used to update conditions for vpa to APIServer
func PatchVPARecConditions ¶
func PatchVPARecConditions( ctx context.Context, vpaRecUpdater control.VPARecommendationUpdater, vpaRec *apis.VerticalPodAutoscalerRecommendation, conditionType apis.VerticalPodAutoscalerRecommendationConditionType, conditionStatus core.ConditionStatus, reason, message string, ) error
PatchVPARecConditions is used to update conditions for vpaRec to APIServer
func SetOwnerReferencesForVPA ¶
func SetOwnerReferencesForVPA(vpa *apis.KatalystVerticalPodAutoscaler, workload runtime.Object) error
SetOwnerReferencesForVPA is used to parse from workload list, and set the runtime information into OwnerReference fields for vpa CR
func SetVPAConditions ¶
func SetVPAConditions( vpa *apis.KatalystVerticalPodAutoscaler, conditionType apis.VerticalPodAutoscalerConditionType, conditionStatus core.ConditionStatus, reason, message string) error
SetVPAConditions is used to set conditions for vpa in local vpa
func SetVPARecConditions ¶
func SetVPARecConditions( vpaRec *apis.VerticalPodAutoscalerRecommendation, conditionType apis.VerticalPodAutoscalerRecommendationConditionType, conditionStatus core.ConditionStatus, reason, message string) error
SetVPARecConditions is used to set conditions for vpaRec in local vpa
func UpdateVPAConditions ¶ added in v0.2.0
func UpdateVPAConditions( ctx context.Context, vpaUpdater control.VPAUpdater, vpa *apis.KatalystVerticalPodAutoscaler, conditionType apis.VerticalPodAutoscalerConditionType, conditionStatus core.ConditionStatus, reason, message string, ) error
Types ¶
This section is empty.