rancher: [BUG] Wrangler show error state for HelmChart
Rancher Server Setup
- Rancher version: v2.9.3
- Installation option (Docker install/Helm Chart): Docker
Information about the Cluster
- Kubernetes version: v1.30.7+rke2r1
- Cluster Type (Local/Downstream): Downstream
- If downstream, what type of cluster? Hosted = Harvester
User Information
- What is the role of the user logged in? Admin
Describe the bug
In k3s helm controller, it introduced Failed condition (https://github.com/k3s-io/helm-controller/blob/b40937ee695b33e80df2bbf4fa3437c8b9bce08d/pkg/apis/helm.cattle.io/v1/types.go#L73).
In wrangler, it checks whether an object is error by checking Failed condition with False status.
Finally, dashboard shows Error for all HelmChart.
To Reproduce
- Create Rancher v2.9.3.
- Import Harvester.
- Create a guest cluster.
Result Check HelmCharts board in guest cluster. Every HelmChart has error state.
Expected Result The HelmChart without error should not show any error state.
Screenshots
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (13 by maintainers)
Commits related to this issue
- [v2.10] #48559 - Added Group, Version, Kind Condition Error Checking at Summary (#50234) * bump steve and wrangler * fixing deps * adjusting pkg/apis deps — committed to rancher/rancher by gehrkefc 2 years ago
- [v2.11] #48559 - Added Group, Version, Kind Condition Error Checking at Summary (#50233) * bump steve and wrangler * go mod tidy * bumping pkg/apis go mod — committed to rancher/rancher by gehrkefc 2 years ago
Investigation Results
For this analysis I’ve reviewed code from rancher/wrangler and k3s/helm-controller and found out that:
The only place in k3s/helm-controller generates the combination of a HelmChartCondition with type=Failed and status=False is in: pkg/controller/chart/chart.go: L248-260
And it doesn’t seem to represent an error. There are other places before this one where errors are clearly being handled and the status is always True as can be seen here:
And here:
Next Steps
I would suggest we review the line pkg/summary/summarizers.go: 223 in wrangler and change it to only consider Type=Failed and Status=True as errors.
Also this error looks like the same we have in SURE-9401. So it would probably resolve that issue too.
@tomleb and I had a meeting yesterday and we’ve decided to implement a “per-resource” condition analysis map. The goal is to map all the condition we can find and attach those to a map indicating if these represent errors or not and for conditions not found in map we’ll keep the previous logic.