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

chore(prometheus-prefect-exporter): make further use of common library chart #356

Merged
merged 7 commits into from
Jul 17, 2024

Conversation

mitchnielsen
Copy link
Contributor

@mitchnielsen mitchnielsen commented Jul 9, 2024

Summary

Makes further use of Bitnami's common library chart.

Closes PrefectHQ/prometheus-prefect-exporter#32

Testing

Defaults

A very rudimentary test is just to compare the default chart output on main and on this branch and confirm that there are no differences:

$ helm template test ../main/charts/prometheus-prefect-exporter > output.main.yaml

$ helm template test charts/prometheus-prefect-exporter > output.branch.yaml

$ dyff between output.{main,branch}.yaml
     _        __  __
   _| |_   _ / _|/ _|  between output.main.yaml, three documents
 / _' | | | | |_| |_       and output.branch.yaml, three documents
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned no differences
        |___/

Specific overrides

Setting the image:

$ helm template test charts/prometheus-prefect-exporter --set image.repository=prometheus-test --show-only templates/deployment.yaml | yq '.spec.template.spec.containers[0].image'
prometheus-test:1.1.0

Setting the name override:

$ helm template test charts/prometheus-prefect-exporter --set nameOverride=prometheusv2 --show-only templates/deployment.yaml | yq '.metadata.name'
test-prometheusv2

Uses the common name template to replace the one we defined that
generates the exporter name.
Uses the 'common.names.fullname' template to replace the one we defined
that generates the exporter full name.
Uses the common chart template for use when defining common labels.
Uses the common matchLabels template to replace the one we had defined.
Uses the common standard labels template to replace the one we had
defined.
Uses the common image template to replace our definition of each
component.

No need to default to the Chart AppVersion because image.tag has a
default value, so it will never be triggered.
@mitchnielsen
Copy link
Contributor Author

Until we address #304, I'll set up some specific tests to confirm the changes here work as expected and then open it up for review.

@mitchnielsen mitchnielsen marked this pull request as ready for review July 17, 2024 21:36
@mitchnielsen mitchnielsen requested a review from a team as a code owner July 17, 2024 21:36
Copy link
Contributor

@jamiezieziula jamiezieziula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!! all code looks good to me 🚀

@mitchnielsen mitchnielsen merged commit a987732 into main Jul 17, 2024
16 checks passed
@mitchnielsen mitchnielsen deleted the exporter-use-common-chart branch July 17, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update prom exporter to use common bitnami charts
2 participants