Skip to content

Commit

Permalink
Address review comments from plkokanov (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ialidzhikov committed Oct 30, 2024
1 parent 2bbd0a8 commit 041de8e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (m *matcher) GetMatchingVPA(ctx context.Context, pod *core.Pod) *vpa_types.
continue
}
if vpaConfig.Spec.TargetRef == nil {
klog.V(5).InfoS("Skipping VPA object because targetRef is not defined. If this is a v1beta1 object switch to v1", "vpa", klog.KObj(vpaConfig))
klog.V(5).InfoS("Skipping VPA object because targetRef is not defined. If this is a v1beta1 object, switch to v1", "vpa", klog.KObj(vpaConfig))
continue
}
if vpaConfig.Spec.TargetRef.Kind != parentController.Kind ||
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/target/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ type vpaTargetSelectorFetcher struct {

func (f *vpaTargetSelectorFetcher) Fetch(ctx context.Context, vpa *vpa_types.VerticalPodAutoscaler) (labels.Selector, error) {
if vpa.Spec.TargetRef == nil {
return nil, fmt.Errorf("targetRef not defined. If this is a v1beta1 object switch to v1.")
return nil, fmt.Errorf("targetRef not defined. If this is a v1beta1 object, switch to v1.")
}
kind := wellKnownController(vpa.Spec.TargetRef.Kind)
informer, exists := f.informersMap[kind]
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/pkg/utils/vpa/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func GetControllingVPAForPod(ctx context.Context, pod *core.Pod, vpas []*VpaWith
// Choose the strongest VPA from the ones that match this Pod.
for _, vpaWithSelector := range vpas {
if vpaWithSelector.Vpa.Spec.TargetRef == nil {
klog.V(5).InfoS("Skipping VPA object because targetRef is not defined. If this is a v1beta1 object switch to v1", "vpa", klog.KObj(vpaWithSelector.Vpa))
klog.V(5).InfoS("Skipping VPA object because targetRef is not defined. If this is a v1beta1 object, switch to v1", "vpa", klog.KObj(vpaWithSelector.Vpa))
continue
}
if vpaWithSelector.Vpa.Spec.TargetRef.Kind != parentController.Kind ||
Expand Down

0 comments on commit 041de8e

Please sign in to comment.