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

[kube-prometheus-stack] rename additionalPrometheusRules prefix #5245

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

TheRealNoob
Copy link
Contributor

@TheRealNoob TheRealNoob commented Jan 28, 2025

What this PR does / why we need it

Rename prefix on additionalPrometheusRules. I'm not sure why the prefix is currently set to the chart name and not the release name. I feel like it should be the release name to avoid conflicts. Thoughts?

Which issue this PR fixes

I didn't open one.

Special notes for your reviewer

Although I bumped the Major version, I don't see it as strictly necessary. Yes the PrometheusRule objects will be destroyed and re-created under a new name, but to Operator that shouldn't make a difference. Not unless you've written your own operator, or something unique like that. But, it's just as easy to play it safe here and bump it anyway, so I have.

Checklist

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

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

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

Hi, i'm on mobile right now, but maybe there is a git blame info to identity a reason for this.

I have also the 63 char length in mind for kubernetes which is not covered yet.

From conflict point of view: the resources are namespaced scoped and not sure if they conflict.

@TheRealNoob
Copy link
Contributor Author

TheRealNoob commented Jan 29, 2025

hmm that's a really good thought. I had a look. It looks like there's only 2 commits on the history for this file. The first one was the migration 5 years from prometheus-operator to kube-prometheus-stack. The second one is more interesting, but also 4 years ago. It added a metadata.name to the List object and did implement fullname over name, but didn't touch the nested PrometheusRule objects.

Helm 3 came out 6 years ago and this history goes back nearly that far, so my guess would be it has been this way since the migration from helm 2. Probably not a lot of people using this template so it doesn't see much change.

Signed-off-by: TheRealNoob <[email protected]>
Signed-off-by: TheRealNoob <[email protected]>
@TheRealNoob
Copy link
Contributor Author

addressed the concerns about trunc 63. I had thought about it as well, I just wanted to make sure maintainers would be open to this change. I'm sure other changes need to be made in preparation for a Major bump?

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.

2 participants