Skip to content

Commit

Permalink
Skip hpav2 resources if metrics type is Resource
Browse files Browse the repository at this point in the history
Signed-off-by: naveenpaul1 <[email protected]>
  • Loading branch information
naveenpaul1 committed Aug 9, 2023
1 parent 45f306b commit 349e04e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/system/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ func (r *Reconciler) reconcileAutoscaler() error {
return err
}
case nbv1.AutoscalerTypeHPAV2:
if r.AdapterHPA.Spec.Metrics[0].Type == autoscalingv2.ResourceMetricSourceType {
r.Logger.Debugf("HPAV2 autoscaler type is %s, skipping HPAV2 resource creation", autoscalingv2.ResourceMetricSourceType)
if err := r.ReconcileObject(r.AdapterHPA, r.reconcileAdapterHPA); err != nil {
return err
}
return nil
}
prometheus, err := getPrometheus(log, prometheusNamespace)
if err != nil {
return err
Expand Down

0 comments on commit 349e04e

Please sign in to comment.