Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-statsd-exporter] fix hpaspec for autoscaling/v2 #3681

Merged
merged 3 commits into from
Sep 23, 2023

Conversation

tylenwells
Copy link
Contributor

What this PR does / why we need it

Changes introduced in #3635 allowed for the new apiVersion but didn't update the spec changes. This fixes that by adding conditionals for spec formatting.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer

@scDisorder - Apologies for missing this the first time around, caught it when working around the original issue locally but didn't make it into the PR before getting merged.

If you would like to use a template here, we could do that. I just did it using semVerCompare for now but would be willing to template it if you prefer.

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@tylenwells
Copy link
Contributor Author

Example of the part of the spec that changed:

old ver:

metrics:
   - type: Resource
      resource:
        name: cpu
        targetAverageUtilization:  {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}

new ver:

metrics:
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}

@zanhsieh zanhsieh requested a review from zeritti September 23, 2023 03:49
@zeritti zeritti merged commit 93a2364 into prometheus-community:main Sep 23, 2023
4 checks passed
Matiasmct pushed a commit to giffgaff/prometheus-charts-backup that referenced this pull request Mar 20, 2024
…us-community#3681)

* fix hpaspec for autoscaling/v2

Signed-off-by: Tylen Wells <[email protected]>

* Use helper template in conditional

Signed-off-by: zeritti <[email protected]>

---------

Signed-off-by: Tylen Wells <[email protected]>
Signed-off-by: zeritti <[email protected]>
Co-authored-by: Tylen Wells <[email protected]>
Co-authored-by: zeritti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants