-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Feat: Ignore revisionHistoryLimit field in StatefulSet for Prometheus, Alertmanager& ThanosRuler #5773
Conversation
My issue is with alertmanager, could you add the same for them? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that we need to expose a revisionHistoryLimit
field in the existing CRDs. IIUC the issue is that the Kubernetes API always returns a default value of 10 in the statefulset spec and if something/someone modifies the value then createSSetInputHash() generates a new hash value triggering a statefulset update.
I assume that if createSSetInputHash
sets RevisionHistoryLimit
to nil before generating the sts hash, it would solve the issue too.
Purposefully ignoring any changes to |
@simonpasquier Why does the spec goes as an interface in Thanos createSSetInputHash? |
Signed-off-by: Azanul <azanulhaque@gmail.com>
No concrete reason I believe. bd658c5#diff-c8f4eb63862907c2cd9e067b2cf70e03f4e134075bd28f507dade553850d4fa3L1627 is where we changed it for Prometheus. |
Shall I do it in the same PR? |
I agree but note that it was your own comment that led to this solution instead of just ignoring the field 😜 |
@rouke-broersma yes I sometimes contradicts myself ;) |
|
@Azanul sorry for the late reply. Can you open another PR to update the Thanos Ruler's |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you do the same change here?
Signed-off-by: Azanul <azanulhaque@gmail.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Azanul <azanulhaque@gmail.com>
@simonpasquier You didn't really have to point out comment's every instance, I'd have fixed it before re-requesting review 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Fixes #5712
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
x
in the box that apply.CHANGE
(fix or feature that would cause existing functionality to not work as expected)FEATURE
(non-breaking change which adds functionality)BUGFIX
(non-breaking change which fixes an issue)ENHANCEMENT
(non-breaking change which improves existing functionality)NONE
(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.