-
Notifications
You must be signed in to change notification settings - Fork 366
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/hash annotations #583
base: master
Are you sure you want to change the base?
Feat/hash annotations #583
Conversation
@raghu-nandan-bs Thanks! Is there an image available in the registry for this branch which we can use? |
Hi @avthart we can build an image using |
@raghu-nandan-bs Would be great if you can provide an |
@avthart please try with |
This looks good:
Also see Kyverno logs:
Created a new RedisFailover:
Only the statefulset is updated every 30 seconds:
|
Any update on this one? |
Hi @avthart sorry, I'll pick this up and close in few days. |
That would be great! |
@avthart could you please try running with image: please add following under spec.template.spec.containers[0] for redis operator deployment
I've updated the code and ran some basic tests. Once you can confirm that this works as expected, I'll add some test cases and finalize the PR. |
@avthart please let me know if you've tried the new image and if it works as expected.. |
Operator running with your version:
Operators logs confirm that resources are up to date:
Checking version of the resources self:
Normally, this counter increases with every reconciliation of the operator. This looks good! Questions:
Thanks! |
@avthart thanks a lot for confirming, I'll proceed with writing test cases and submit the PR formally.
Since this is a new feature, would like to keep it in "beta" state and not break existing functionality. Any user who wants to use this optimization can opt-in with the flag. Once the feature is generally accepted, we can make it a default. @samof76 @dinesh-murugiah @ese please pitch in if there's any contrary opinion.
I hope so, depends on the repo's owners 😬 |
// Set the correct resource version to ensure we are on the latest version. This way the only valid | ||
// namespace is our spec(https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#concurrency-control-and-consistency), | ||
// we will replace the current namespace state. | ||
statefulSet.ResourceVersion = storedStatefulSet.ResourceVersion |
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.
resource version always changes after apply, causing sts to have perpetual diff
bbf6f34
to
700e8bd
Compare
Any update @raghu-nandan-bs @ese @samof76? |
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.
LGTM
Fixes #580
Changes proposed on the PR:
CreateOrUpdate
, apply the changes only if there is a diff in hash.