Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Record of changed resources in events is inaccurate #2601

Closed
squaremo opened this issue Nov 11, 2019 · 1 comment
Closed

Record of changed resources in events is inaccurate #2601

squaremo opened this issue Nov 11, 2019 · 1 comment
Labels

Comments

@squaremo
Copy link
Member

In pkg/daemon/sync.go there's a calculation of which Kubernetes resources were changed in the most recent application, which is recorded in the event posted upstream (wherever that is). But it's pretty bogus, because

  • it thinks all the resources defined in a file have changed, if that file has changed at all;
  • it considers all resources generated by a .flux.yaml config to have changed, every time
  • it doesn't really know what "changed" means, anyway -- any textual difference will do, whether or not it had a material affect.

I can think of a couple of ways to get a better result:

  • pay attention to what kubectl reports, when applying manifests, since that gives a resource-by-resource account (though it's not always accurate itself; and parsing the output may not be a stable source of info)
  • keep track of the resources from last time, and do a bytes-wise comparison to at least determine which resources really changed (if not necessarily meaningfully).
@squaremo squaremo added the bug label Nov 11, 2019
@squaremo squaremo changed the title Record of changed resources in events is way inaccurate Record of changed resources in events is inaccurate Nov 11, 2019
@kingdonb
Copy link
Member

kingdonb commented Jul 28, 2021

This issue is still present in Flux v2, but in a different shape.

It would mean pretty major investment in rewriting parts to fix this now, in Flux v1.

Closing, as:

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

No branches or pull requests

2 participants