Closed manno closed 1 week ago
This is how the resource list is propagated:
To address this issue we merged two PR's
We aim to utilize precise resource lists and counts. Previously, in bundles, we set status.ResourceKey
by running a Helm template, which did not provide the actual resources. With the refactoring introduced in the attached PRs, we now rely on the actual resources from bundle deployments, and bundle.status.ResourceKey
is derived from these deployments.
A similar issue existed with gitRepos, as described in point 1. Now, gitRepos also populate gitrepo.status.Resources
based on actual bundle deployments.
These PRs introduced refactoring that modifies gitRepos so that gitrepo.status.Resources
is now populated from bundle deployments instead of bundles. Similarly, the refactoring for bundles ensures that bundle.status.ResourceKey
is populated from bundle deployments rather than by running Helm templates.
This is primarily refactoring and should not alter any behavior in Fleet.
We need to confirm that bundle.status.ResourceKey
has correct values, as well as gitrepo.status.Resources
.
We have some integration and e2e tests to check this.
Rancher v2.9-d2fa8a7d6116c48a814ee7983af522d614461e49-head
with Fleet 104.0.0+up0.10.0-rc.19
Single cluster k3s with v1.28.8+k3s1
Clusters Ready
and Resources fields contain all info expected on multiple GitreposBundles
, Resources
and Conditions
are correctly populated on UI:
bundle.status.ResourceKey
and gitrepo.status.Resources
have correct valuesLooking good to me.
@manno , before closing this item I just wanted to ask if we are ok with the open questions unchecked above or if there is need to be reviewed.
Thank you.
Commented with the team. Agreed general testing is ok and note to due later checking with Clusters and Cluster Groups. Closing issue.
Background
The old key
BundleStatus.ResourceKey
https://fleet.rancher.io/ref-crds#resourcekey works like this:The sum of all resources in bundles is stored in the GitRepo. This seems to multiply the estimate.
We want to use the accurate resource lists and counts. The
BundleDeploymentStatus.Resources
lists the actual deployed resources from Helm:Open Questions
bundledeployment.status.resources
directly? - It does.Possible Follow Ups:
helm template
fleet controller in a later release (like 2.10)TODO
gitrepo.status.resources
frombundledeployment.status.resources
instead, see fromResourceKey. PR #2523bundle.status.resourceKey
is still computed fromhelm template
, for compatibility. We need to check if UI dashboard uses this. Once it's no longer used, we can stop populating the field and removehelm template
.bundledeployment.status.resources
in bundle reconciler PR #2535Also see: