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 watched resources not getting created when deleted #23238

Closed
deva26 opened this issue Apr 24, 2020 · 1 comment · Fixed by #24366
Closed

Operator watched resources not getting created when deleted #23238

deva26 opened this issue Apr 24, 2020 · 1 comment · Fixed by #24366
Assignees

Comments

@deva26
Copy link
Contributor

deva26 commented Apr 24, 2020

Operator watched resources not getting created when deleted
Istio operator reconciler gets called when a watched resource is deleted. However the reconciler does not recreate the deleted resource as part of running the reconciliation.

Expected behavior
When a resource, say istiod deployment is deleted (possibly by a mistake), istio operator has to recreate the deleted resource as part of reconciiation

Steps to reproduce the bug

Version (include the output of istioctl version --remote and kubectl version and helm version if you used Helm)

How was Istio installed?

Environment where bug was observed (cloud vendor, OS, etc)

Recreate a watched resource when deleted was working several commits earlier. With the introduction of ObjectCache struct in the helmreconciler, reconciliation became a function of the delta between what was there in the cache and the new manifest created. In that process a change of what was running in the k8s cluster was missed out.

@morvencao
Copy link
Member

morvencao commented Jun 3, 2020

The is because the new reconcile loop will just check the object cache for the watched objects, it if it is already in cache, it will do nothing.

The simplest way I can figure out is to delete object from cache when we get a delete event for the corresponding object, so that it will be recreated in the next reconcile loop.

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

Successfully merging a pull request may close this issue.

3 participants