-
Notifications
You must be signed in to change notification settings - Fork 199
Add .status.inventory to track managed objects
#1385
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
Conversation
84d260a to
c0e47fd
Compare
931da80 to
8442962
Compare
|
Wouldn't it be better to build this state through observations in the storage layer? |
Hi @hiddeco! You raise an excellent point here, that was my recommendation as well. I was told that doing this through storage observations would be more reliable. I have a gut feeling that this is accurate, but I don't have the precise explanation. Could you please shed some light on the details of why this is more reliable? (I'm guessing that the explanation is a one-liner but I can't get it together myself) |
|
@matheuscscp You did mention using @hiddeco @matheuscscp You're both right. Using the storage layer would bring a similar pattern to kustomize-controller - building inventory at the point of persistence rather than fetching from Helm storage after the fact. I'll rework the implementation to use |
|
Thanks for the great feedback! I've addressed the suggestions in 7d3fa01:
|
matheuscscp
left a comment
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.
Great iteration!
stefanprodan
left a comment
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.
Please add a section to the API docs for the inventory after https://github.com/fluxcd/helm-controller/blob/main/docs/spec/v2/helmreleases.md#history
matheuscscp
left a comment
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! 🚀
Please squash for the merge 😁
This adds the `.status.inventory` field to HelmRelease, similar to Kustomization, to expose managed Kubernetes objects. The inventory includes: - Objects from the release manifest (with namespace complement) - CRDs from the chart's crds/ directory Helm hooks are excluded as they are ephemeral resources deleted after execution. Signed-off-by: cappyzawa <cappyzawa@gmail.com>
9fee3db to
bb1839e
Compare
Resolves: #1352