diff --git a/vertical-pod-autoscaler/pkg/utils/metrics/resources/resources.go b/vertical-pod-autoscaler/pkg/utils/metrics/resources/resources.go index e14ba2649a..8c2badf5f9 100644 --- a/vertical-pod-autoscaler/pkg/utils/metrics/resources/resources.go +++ b/vertical-pod-autoscaler/pkg/utils/metrics/resources/resources.go @@ -30,9 +30,17 @@ const ( type resourcesSource string const ( - ContainerStatus resourcesSource = "Pod.Status.ContainerStatuses" - InitContainerStatus resourcesSource = "Pod.Status.InitContainerStatuses" - PodSpecContainer resourcesSource = "Pod.Spec.Containers" + // ContainerStatus indicates that resources were fetched from the + // containerStatuses pod field. + ContainerStatus resourcesSource = "Pod.Status.ContainerStatuses" + // InitContainerStatus indicates that resources were fetched from the + // initContainerStatuses pod field. + InitContainerStatus resourcesSource = "Pod.Status.InitContainerStatuses" + // PodSpecContainer indicates that resources were fetched from the + // containers field in the pod spec. + PodSpecContainer resourcesSource = "Pod.Spec.Containers" + // PodSpecInitContainer indicates that resources were fetched from the + // initContainers field in the pod spec. PodSpecInitContainer resourcesSource = "Pod.Spec.InitContainers" ) diff --git a/vertical-pod-autoscaler/pkg/utils/resources/resourcehelpers.go b/vertical-pod-autoscaler/pkg/utils/resources/resourcehelpers.go index f4533e90b0..54c71b9faa 100644 --- a/vertical-pod-autoscaler/pkg/utils/resources/resourcehelpers.go +++ b/vertical-pod-autoscaler/pkg/utils/resources/resourcehelpers.go @@ -18,8 +18,9 @@ package resourcehelpers import ( v1 "k8s.io/api/core/v1" - metrics_resources "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/utils/metrics/resources" "k8s.io/klog/v2" + + metrics_resources "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/utils/metrics/resources" ) // ContainerRequestsAndLimits returns a copy of the actual resource requests and