Skip to content

Commit

Permalink
feat: check if ScaleTargetRef is possible option
Browse files Browse the repository at this point in the history
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
  • Loading branch information
matthisholleville committed Mar 31, 2023
1 parent 4916fef commit 5dad75f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/analyzer/hpaAnalyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ func AnalyzeHpa(ctx context.Context, config *AnalysisConfiguration, client *kube
if err != nil {
scaleTargetRefNotFound = true
}
default:
failures = append(failures, fmt.Sprintf("HorizontalPodAutoscaler uses %s as ScaleTargetRef which does not possible option.", scaleTargetRef.Kind))
}

if scaleTargetRefNotFound {
Expand Down

0 comments on commit 5dad75f

Please sign in to comment.