Skip to content

Commit

Permalink
Merge pull request #1190 from naveenpaul1/adapter-skip
Browse files Browse the repository at this point in the history
Skip hpav2 resources if metrics type is Resource
  • Loading branch information
naveenpaul1 authored Aug 10, 2023
2 parents 45f306b + 349e04e commit c29048f
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 c29048f

Please sign in to comment.