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 should react on all out of sync k8s components #172

Open
l0kix2 opened this issue Mar 19, 2024 · 1 comment
Open

Operator should react on all out of sync k8s components #172

l0kix2 opened this issue Mar 19, 2024 · 1 comment
Labels
backlog Backlog

Comments

@l0kix2
Copy link
Collaborator

l0kix2 commented Mar 19, 2024

Currently operator only detects diff only with yson configs and images, but if we deploy new version of operator, which will want to add something in pod specs — this wouldn't be applied.

It is expected that operator should compare all the desired state with state of the world and try to lead components to the desired state. Changes that operator makes should lead to minimum downtime possible.

@l0kix2
Copy link
Collaborator Author

l0kix2 commented Apr 24, 2024

Here is very relevant discussion kubernetes-sigs/kubebuilder#592
As far as I understood recommended options are:

  1. use update with dry-run and compare results What is the proper way to compare resource object? kubernetes-sigs/kubebuilder#592 (comment) — this should work good, but will make a lot of requests to k8s api (especially since our operator re-enqueues sync too much)
  2. Store hashes in annotations like kubectl does and compare them — though some concerns are here What is the proper way to compare resource object? kubernetes-sigs/kubebuilder#592 (comment) . There is also a lib for that https://github.com/banzaicloud/k8s-objectmatcher

I think we could start with sts diff improvement. First option sound cleaner/simpler to me (less hardcoding fields for not comparing), but I think we need to research a number of calls to k8s api first and possibly stop requeuing reconcillation unless there is an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Backlog
Projects
Status: No status
Development

No branches or pull requests

2 participants