helm: Fall back gracefully when chart URL has no matching repository#16049
helm: Fall back gracefully when chart URL has no matching repository#16049sowmya-sl wants to merge 1 commit intoopenshift:mainfrom
Conversation
Instead of returning an error when no HelmChartRepository matches the chart URL, log an info message and return a ChartInfo with the version extracted from the URL. This allows charts from registries without a configured repository to be resolved.
|
Skipping CI for Draft Pull Request. |
|
@sowmya-sl: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
webbnh
left a comment
There was a problem hiding this comment.
I assume that this change is OK, but I have some questions.
/lgtm
| return &ChartInfo{ | ||
| Version: chartVersionFromURL(chartUrl), | ||
| }, nil |
There was a problem hiding this comment.
So, we fabricate a Version from the URL but we leave the Name blank? That seems like a curious choice...can't we extract the Name from the URL too? Is there a reason why we don't want to do that? (And, are we prepared for what happens if we return empty-handed from chartVersionFromURL()? In particular, is this going to do the right thing given an oci:// URL?)
There was a problem hiding this comment.
The other fields are tied to repository - repository.Name, repository.Namespace, chartIndex. This is for a case where there is no repository available. We don't want to guess these names, as the customer might have input them differently.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sowmya-sl, webbnh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Instead of returning an error when no HelmChartRepository matches the chart URL, log an info message and return a ChartInfo with the version extracted from the URL. This allows charts from registries without a configured repository to be resolved.
This helps when the customer has installed helm chart using Helm CLI and wants to upgrade it via console.