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

Operator continuously updates Kubernetes deployments #580

Closed
avthart opened this issue Mar 28, 2023 · 7 comments · May be fixed by #583 or #584
Closed

Operator continuously updates Kubernetes deployments #580

avthart opened this issue Mar 28, 2023 · 7 comments · May be fixed by #583 or #584
Labels

Comments

@avthart
Copy link

avthart commented Mar 28, 2023

We are using Kyverno which validates every object on change.

The redis-operator is updating the rfs deployments overy 30 seconds, even when nothing is changed.
This creates additional load on Kyverno, especially in environments with a lot of redisfailovers instances.

This can be verified with:

kubectl get deploy -w

Or check the number observedGeneration which is in our case 496690

It would be great if the rfs deployments would be updated only when needed.

Also see #410 (comment)

@avthart avthart changed the title Operator continuously updates Kubernetes objects Operator continuously updates Kubernetes deployments Mar 28, 2023
@avthart
Copy link
Author

avthart commented Mar 28, 2023

Did a diff on two versions:

diff /tmp/1.yaml /tmp/2.yaml 
7c7
<   generation: 496690
---
>   generation: 496693
23c23
<   resourceVersion: "1087217544"
---
>   resourceVersion: "1087219466"
180c180
<   observedGeneration: 496690
---
>   observedGeneration: 496693

@nickvth
Copy link

nickvth commented Mar 29, 2023

+1

@raghu-nandan-bs
Copy link
Contributor

@samof76 to address this, I can think of couple of improvements.

  • using cached informers instead of making direct "get" calls to kubernetes API like here
  • use a "hash" of redisfailover object as annotation, and apply the changes whenever this "hash" changes due to CR updates. This way, we dont have to call create / apply call every thirty seconds like here, but only when this resource hash changes.
    what are your thoughts on this?

@github-actions
Copy link

This issue is stale because it has been open for 45 days with no activity.

@github-actions github-actions bot added the stale label May 20, 2023
@github-actions
Copy link

github-actions bot commented Jun 3, 2023

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2023
@avthart
Copy link
Author

avthart commented Sep 20, 2023

Please re-open ticket. This is still an issue.

@avthart
Copy link
Author

avthart commented Sep 20, 2023

Not stale. Reopen ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants