Bug 2070172
| Summary: | SRO uses the chart's name as Helm release, not the SpecialResource's | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Quentin Barrand <quba> |
| Component: | Special Resource Operator | Assignee: | Quentin Barrand <quba> |
| Status: | CLOSED ERRATA | QA Contact: | Udi Kalifon <ukalifon> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 4.11 | CC: | aos-bugs |
| Target Milestone: | --- | ||
| Target Release: | 4.11.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-08-10 11:02:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Quentin Barrand
2022-03-30 14:25:28 UTC
Merged upstream in https://github.com/openshift-psap/special-resource-operator/pull/286 PR downstream and backport TODO. @quba I changed the chart's name in index.yaml and updated my configmap, and I also changed the specialresource's CRD so that the SR's name is simple-kmod-sr-name and the chart's name is simple-kmod-chart-name. I get this in the SRO log:
cm-getter2022/05/13 10:25:51 Element: index.yaml
2022-05-13T10:25:51.612Z INFO helmer Locating {"chart": "example/simple-kmod-chart-name"}
2022-05-13T10:25:51.640Z ERROR controller.specialresource Reconciler error {"reconciler group": "sro.openshift.io", "reconciler kind": "SpecialResource", "name": "simple-kmod-sr-name", "namespace": "", "error": "RECONCILE ERROR: Cannot reconcile special resource: Could not locate chart example/simple-kmod-chart-name: chart \"simple-kmod-chart-name\" matching 0.0.1 not found in example index. (try 'helm repo update'): no chart name found", "errorVerbose": "Could not locate chart example/simple-kmod-chart-name: chart \"simple-kmod-chart-name\" matching 0.0.1 not found in example index. (try 'helm repo update'): no chart name found\nRECONCILE ERROR: Cannot reconcile special resource\ngithub.com/openshift-psap/special-resource-operator/controllers.(*SpecialResourceReconciler).Reconcile\n\t/workspace/controllers/specialresource_controller.go:94\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:114\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:311\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227\nruntime.goexit\n\t/usr/lib/golang/src/runtime/asm_amd64.s:1581"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227
How do I properly change the chart's name?
The make-cm-recipe script is the preferred way to create a ConfigMap-based recipe: https://github.com/openshift/special-resource-operator/blob/master/scripts/make-cm-recipe In that case, I think there was a mismatch between the name of the chart in the index (simple-kmod-chart-name) and the name in Chart.yaml. The script generates index.yaml and avoids potential errors there. Verified with the latest 4.11 code from bundle. I created 2 special resources from the same CMs. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:5069 |